Hi there community ✌🏼,
I want to have an automation rule which gets triggered by new or removed issue links, which then fetches all linked issues and puts it into a multi-line text field.
The output in the text field should display a filtered and sorted list (by issue type) of the linked issues.
Therefor I made use of the trigger "When: issue linked" for "All link types" and then the action with the smart value code (bellow ⬇️).
In principle this works already, but I found out that apparently THE TRIGGER 🛫 does NOT work vor "All link types". It seems like it's only working for outward links I add to the issue like
and is NOT working for new links with type
Note 1: I already found this article "How to update the list of linked issues into a multiline text custom field." But I only need the link-list in the source issue and not in the destination issues, so I assume a won't need a branch in my automation rule.
Note 2: The linked issues do come from two other Jira projects and I made sure I set the scope of the rule to these projects (just in case)
Note 3: For removed issue links I setup a separate rule and it is getting triggered as expected
Master @Bill Sheboyany idea? ;-)
{{#issue.issuelinks.inwardIssue}}
{{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"XXX")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.outwardIssue}}
{{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"XXX")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.inwardIssue}}
{{#if(and(key.startsWith("IMAGE-"), equals(issuetype.name,"YYY")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.outwardIssue}}
{{#if(and(key.startsWith("IMAGE-"), equals(issuetype.name,"YYY")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.inwardIssue}}
{{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Design")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.outwardIssue}}
{{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Design")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.inwardIssue}}
{{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Master")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.outwardIssue}}
{{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Master")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.inwardIssue}}
{{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Adaption")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
{{#issue.issuelinks.outwardIssue}}
{{#if(and(key.startsWith("PACPP-"), equals(issuetype.name,"Adaption")))}}
{{key}} ({{customfield_10034}})
{{/}}
{{/}}
………… and this procedure for 3 more issue types ………
First thing: what problem are you trying to solve? That is, "why put a list of links into that field?" Knowing the "why" may help the community offer better suggestions.
Until we know that...
The work item linked trigger only fires in the direction of the links (as configured in admin features) regardless of from where the link was added. Thus, please consider how that impacts what you want solve.
For example, if based on the link types involved, your desired work item will always be the destination one, the rule would need to be restructured to use that rather than the trigger work item.
Next, the challenging part of what you describe is the sorting as there is no built-in, list item sort feature for smart values. A workaround could be using JQL:
Finally, there is one link type which never triggers Work Item Linked in rules: adding a delivery ticket to a Jira Product Discovery (JPD) Idea. Even though this looks like it is just an "implements" type, behind the scenes it is a special "Polaris" link type and was apparently, intentionally excluded by Atlassian's code. More confusingly, a standard "implements" type can be used for any other work item type linking.
Kind regards,
Bill
You’re running into a known limitation of the “Issue linked” trigger in Jira Cloud automation. That trigger only fires for the issue where the link is *created from*—in other words, the outward side of the link. It doesn’t fire automatically on the inward (destination) issue because Atlassian only records the event on the issue that initiated the link creation. This is documented in Atlassian’s automation rule triggers behavior where link events are not symmetrical across both issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.