i write a lot of JIRA Automation rules to connect JIRA to SLACK, based on triggered events occurring in JIRA.
I'm looking for two things:
1. the basic macro that lists out all LINKED ISSUES.
i've been trying to use {{issue.issuelinks.first.inwardIssue.key}} but that returned a blank/NULL
2. macro for most-recent / new linked issue.
this way i can program an initial alert for ALL LINKED ISSUES, and then a second alert if a new linked issued is linked.
--COPY OF MY AUTOMATION JIRA TEXT WITH CURRENT MACROS--
*---NEW LINKED ISSUE----*
*JIRA:* {{issue.key}} *
Link:* <https://tihealth.atlassian.net/browse/{{issue.key}}>
Program Status is now set to: {{issue.status.name}}
---
Linked Issues: {{issue.issuelinks.first.inwardIssue.key}} <--this doesnt work
---
Tag Type Setting: {{issue.fields.customfield_11182}}
---
::DCM IDs:: Profile: {{issue.fields.customfield_11269}}
SubProfile: {{issue.fields.customfield_11270}}
Campaign: {{issue.fields.customfield_11271}}
Partner ID: {{issue.fields.customfield_11289}}
Auction ID report scheduled: {{issue.fields.customfield_11272}}
-------------------------------
Hi @Matt Lind -- Welcome to the Atlassian Community!
Some issue link types are directional, and so the inwardIssue attribute will not include all of the issue links.
If you only wanted the inward links, please try this:
{{issue.issuelinks.inwardIssue.key}}
If you only wanted the outward links, please try this:
{{issue.issuelinks.outwardIssue.key}}
FYI, I recommend using this how-to article for finding all smart values, and testing with an example issue, to learn more about the structure of the smart values within an issue: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you only want the linked issues for a specify type, your two options are:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes...
The Lookup Issues action may use JQL to gather a set of issues.
To process issues individually, branching on JQL is possible.
Additionally, there are rule conditions which may use JQL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i figured out "Relates To" does have background Inward Issues vs Outward issues types, even though there is only one drop down...
if you link Ticket B as a "relates to" linked issue while you are within ticket A, its Outward for any Automation rules pertaining to issue A, but it would be an Inward issue if writing rules pertaining to Ticket B -- and vice-versa.
These were both relevant since users sometimes link issues on either side of Ticket A/B divide.
And, that also means you need to write 2 automation rules if the linked issues are across Projects if (like me) your automation rule permissions limit you to a single Project at a time.
{{issue.issuelinks.inwardIssue.key}},{{issue.issuelinks.outwardIssue.key}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...
In my experience, I have not found rule behavior consistent (i.e., deterministic) regarding which issue is the "trigger" versus "destination" when the trigger was Issue Linked. And when a specific link type is specified for cross-project issue linking, the rule scope also impacted behavior. Worsening this, some Jira behavior occurs in multiple steps (i.e., not one event) and so the links are added / modified after another rule may have triggered by an event. E.g., cloning with links. Although I admin it may be the behavior is deterministic, but just not documented well / unambiguously.
When the link direction matters with this trigger type, I include rule logic to handle both possible paths in a single rule, when possible :^)
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.