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}}
Figured it out. This is the smart value that provided the link type name:
{{issue.fields.issuelinks.type.name}}
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
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.