Skip to main content
Example scripts
arrow icon
To homepage
Jira
Data centre icon
Data Center

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

Created 1 year ago, Updated 4 month(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
Jira (8.0 - 8.19)
compatibility bullet
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