You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
getVersions() returns versions from other projects #383
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("");
}
Activity