Unable to edit version with VersionManager

Hi,

I am trying to edit the version of a project using VersionManager.

     versionManager.releaseVersion(versionObject,true);
     log.info("***** release status changed to : "+versionObject.isReleased()+" *****");

I am changing the release status of a version using the above code. But after executing releaseVersion also, the status of versionObject prints false.

What am I missing? Is there a method to save or persist the changes?

Thanks.

2 Likes

Found the answer. Had to capture the return value.

versionObject = versionManager.releaseVersion(versionObject,true);
2 Likes

Make sure to also persist the change using VersionManager.Update(Version)
https://docs.atlassian.com/jira/7.1.7/com/atlassian/jira/project/version/VersionManager.html#update-com.atlassian.jira.project.version.Version-

2 Likes