Hi!
I am trying to bulk change issue types via groovy. I have been able to do so but only at a single issue, here is the following script:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption
def issueManager = ComponentAccessor.issueManager
def constantsManager = ComponentAccessor.constantsManager
def loggedInUser = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def issueKey = 'xx-xxx'
def issue = issueManager.getIssueObject(issueKey)
def summary = issue.summary
def description = issue.description
def sourceIssuetype = issue.getIssueType().getName()
def targetIssueType = constantsManager.allIssueTypeObjects.find {it.name == 'Task' }
if (sourceIssuetype = 'Bug') {
issue.setIssueType(targetIssueType)
issueManager.updateIssue(loggedInUser, issue, EventDispatchOption.DO_NOT_DISPATCH, false)
}I am hoping to pass a JQL into the script or a bulk amount of issues to change at once. The UI move is very tedious and often times out for us. Any suggestions?
Hi Lorenze,
Indeed just renaming "clones" to "cloners" should resolve this behavior. For some additional background on this issue please check the following KB article out:
Let us know if this helps :).
Or maybe add a new issue link called "Cloners"? I have yet to try this.
Thanks for the response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Happy to help! Indeed adding another issue link called "Cloners" will also resolve the behavior as well. Essentially Jira is just looking for this exact matching string during the process of creating the issue link while cloning an issue.
Please let us know how it goes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.