Hi everyone,
I’m working on a Jira Automation rule and ran into a limitation when trying to link multiple issues dynamically via an Advanced Edit action.
Here’s the context:
- I have a dynamic lookup table {{inwardIssueLinksTable}} which stores all inward issue links for a specific work item:
Inward Table: LookupTable{objectMap={96008=PSS-10173, 95276=COR-53017, 95271=PSS-10040}, size=3, entries=[LookupTableEntry{key=96008, value=PSS-10173}, LookupTableEntry{key=95276, value=COR-53017}, LookupTableEntry{key=95271, value=PSS-10040}]}
-
Then I have a smart variable called
<span>{{PSSInwardIssueKeys}} = PSS-10173, PSS-10040
</span>
(it’s generated earlier in the rule based on the lookup table and can contain one or several PSS issue keys).
-
I’m already inside a branch that loops over the most recently created work item.
-
Now I want to link this most recently created work to multiple PSS issues.
Here’s the Advanced Edit I’m using:
<span>{
"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "Fixes in continuous deployment"
},
"outwardIssue": {
"key": "{{PSSInwardIssueKeys}}"
}
}
}
]
}
}</span>
As expected, this works fine if there’s only one issue key in the variable.
But when multiple keys are included, Jira returns this error:
<span>Error editing work items
COR-53314 (Too many operations (2) provided for field 'issuelinks'. We support at most 1 operation for this field. (issuelinks))</span>
I understand why this happens — the REST API expects one add object per link, not a comma-separated list — but I can’t easily add another For each smart value branch to loop over {{PSSInwardIssueKeys.split(",")}}, since I’m already inside a branch for the Hotfix.
So, is there a way to:
-
Dynamically generate multiple "add" blocks in one Advanced Edit JSON (e.g. using smart value iteration within the "most recently created work item" branch)?
-
Or otherwise, link multiple issues within a single branch context?
Any ideas or examples would be much appreciated, ideally something that can handle a variable number of linked issues without leaving the current branch.
Thanks!