Retrieving link type name

john_monteith October 2, 2024

I am trying to create a rule that triggers when an issue is linked. The rule only applies to a specific issue type and the destination issue is of a specific type. The protocol for linking these two types of issues calls for the use of a specific link type: "Linked issue cannot finish until this issue finishes". If the wrong link type is used to link these two issues an email should be sent notifying the admin which user made the error in linking, the email should include the issue key for the trigger issue and the destination issue. I also want it to include the name of the incorrect link type that was used. This is where I'm having a problem. I tried to create a variable that captures the name of the incorrect link type (i.e. "duplicates", "is caused by", etc.) but I can't figure out the correct format for the smart value, I always get a blank field. I have tried:
{{issue.issuelinks.first.linktype}}

{{#issue.issuelinks}}{{#if outwardIssue}}{{linktype}}{{/}}{{/}}

{{issue.issuelinks.get(0).linktype}}

Jira capture.PNG

1 answer

1 accepted

3 votes
Answer accepted
john_monteith October 2, 2024

Figured it out. This is the smart value that provided the link type name:

{{issue.fields.issuelinks.type.name}}

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 2, 2024

Hi @john_monteith 

Well done solving your own question!

FYI this how-to article may help in the future to see the supported smart values, and their structure, which is available to rules: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events