moveIssuesToNewVersion : not added in change history

Hello there!

I wanted to use the function moveIssuesToNewVersion in Version Manager ( VersionManager (Atlassian JIRA 7.1.8 API)) but the affected issues don’t have any change in their history.

I need to see the change in the history to fill a custom field.

I’m not 100% sure but I think all change made by API on issues should appear in change history, aren’t they?

The script used is here:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.version.VersionManager
import com.atlassian.jira.issue.Issue

def projectManager = ComponentAccessor.getProjectManager()
def versionManager = ComponentAccessor.getVersionManager()

def keyProject = "ASDR"
def project = projectManager.getProjectByCurrentKey(keyProject)


def allIssuesCollection = null;
def issuesList = new ArrayList<Issue>();

def newVersion = versionManager.getVersion(project.getId(), "Pack 2021-2")
def version = versionManager.getVersion(project.getId(), "Pack 2021-1")

allIssuesCollection = versionManager.getIssuesWithFixVersion(version)
for (issue in allIssuesCollection){
	if (issue.getResolution() == null) issuesList.add(issue);
}
versionManager.moveIssuesToNewVersion(issuesList, version, newVersion)

return true

To use it:

  • create two packs called “Pack 2021-1” and “Pack 2021-2”
  • create issues with fixVersion = Pack 2021-1.
  • change the value of keyProject in the script regarding to your project

Could you please confirm me this is a bug?
Thank you,
Olivier