Example scripts
To homepage
Jira

Clone a Work Item and Link To It
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira
Language |
groovy
def workItemKey = 'WorkItemKeyHere'
def sourceWorkItem = WorkItems.getByKey(workItemKey)
def space = sourceWorkItem.getSpaceObject()
def workType = sourceWorkItem.getWorkType()
def clonedWorkItem = WorkItems.create(space.key, workType.name) {
summary = sourceWorkItem.summary
description = sourceWorkItem.description
}
// Change link type name below if you do not want to use the clones link type
clonedWorkItem.link("clones", sourceWorkItem)
Having an issue with this script?
Report it here