Example scripts
To homepage
Jira

Create a Sub-task and Link to Parent Issue in Jira
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira (8.0 - 8.19)

ScriptRunner For Jira (7.10.0)
Language |
groovy
def parentIssue = Issues.getByKey('SR-1')
parentIssue.createSubTask('Sub-task') {
setSummary('This is a sub-task...')
// any other fields on the sub-task can be set, in the same way as when creating a standard issue
}
Having an issue with this script?
Report it here