Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • The clone link type "Cloners" does not exist. A link to the original issue will not be created.

Bulk Changing issues Types via Groovy

Zachary Singh
November 1, 2023

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?

1 answer

0 votes
David Di Blasio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 13, 2018

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 :).

lorenze larot
November 20, 2018

Or maybe add a new issue link called "Cloners"? I have yet to try this. 

 

Thanks for the response. 

David Di Blasio
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 20, 2018

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.

Suggest an answer

Log in or Sign up to answer