Hi,
I'm trying to clone an issue using Automation for Jira. I want the new issue to include all the links of linked-issues from the original issue.
This is not possible using the automation interface and may be possible using the "Additional fields" using JSON.
I tried already to use the "Additional fields" but I succeed in adding only 1 link from the original issue. If the original issue has more than 1 link - it seems that iteration over the {{issue.issuelinks}} doesn't work.
Can someone help?
Attaching some of my solutions that didn't work:
{{#issue.issuelinks}}
{
"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "{{type.name}}"
},
"outwardIssue": {
"key": "{{outwardIssue.key}}"
}
}
}
]
}
}
{{/}} {{#issue.issuelinks}}
{
"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "{{type.name}}"
},
"outwardIssue": {
"key": "{{outwardIssue.key}}"
},
"inwardIssue": {
"key": "{{inwardIssue.key}}"
}
}
}
]
}
}
{{/}} {{#issue.issuelinks}}
{
"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "{{type.name}}"
},
{{#if(outwardIssue)}}
"outwardIssue": {
"key": "{{outwardIssue.key}}"
},
{{/}}
{{#if(inwardIssue)}}
"inwardIssue": {
"key": "{{inwardIssue.key}}"
}
{{/}}
}
}
]
}
}
{{/}}