Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

getVersions() returns versions from other projects #383

Copy link
Copy link
@zaraterdz

Description

@zaraterdz
Issue body actions

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("");
}

}`

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.