Hi,
I just need to define the link to the parent issue when the child gets created and I can't find any example of how to do this.
def taskType = get('/rest/api/2/issuetype').asObject(List).body.find { it['name'] == 'Warranty Claim Robot Component' }['id']
post('/rest/api/2/issue')
.header('Content-Type', 'application/json')
.body(
[
fields: [
summary : 'Test Ignore this',
description: "Test Ignore this",
project : [
key: projectNewIssueKey
],
issuetype : [
id: taskType
],
//Need to define issue links here?
]
])
.asString().bodyI've found a rest example of this but I am unsure of how to convert it to scriptrunner/groovy syntax.
https://docs.atlassian.com/jira/REST/cloud/#api/2/issueLink-linkIssues
Any help would be much appreciated.
Kind regards
Thomas P. Hargreaves