-
Notifications
You must be signed in to change notification settings - Fork 163
Open
Description
Expected behavior: The getVersions(projectID) method should only return versions from a specific project.
Current behavior: The method is returning versions from multiple projects, even though it is passed a specific projectID.
Library Version: redmine-java-api 3.1.2
Description: When using the getVersions method with a specific projectID, the returned list of versions contains versions that belong to other projects, which is not the expected behavior.
Code snippets:
`@Override
public Sprint getSprintByName(String projectKey, String sprintName) throws IssueTrackerException {
try {
Project project = manager.getProjectManager().getProjectByKey(projectKey);
List versions = manager.getProjectManager().getVersions(project.getId());
for (Version version : versions) {
if (version.getName().equals(sprintName) && version.getId().equals(project.getId())) {
return new RedmineSprintBuilder(version).build();
}
}
throw new NotFoundException("version not found in project '" + projectKey + "'.");
} catch (RedmineException ex) {
throw new IssueTrackerException("");
}
}`
Metadata
Metadata
Assignees
Labels
No labels