Jira Automation -Edit field value on linked issue removal if no other linked of same type

Richard Wright February 12, 2021

Scenario:

An issue can have 1 to many linked issues of type "Bronze Automated" (In link: "Automated in Bronze", out link: "Bronze Automated"). When an issue of that type is linked, the "Running in Bronze" field is populated it "Yes" (I have this working). What I'm struggling to get working is when "Bronze Automated" linked issues are removed, I want to change the "Running in Bronze" field to "No" only if there are no other "Bronze Automated" issue links. Currently, it'll update if any "Bronze Automated" linked issues are removed.

Here's a screenshot of the Automator rule:

Screen Shot 2021-02-12 at 1.53.43 PM.png

 

I have tried both "Bronze Automated" and "Automated in Bronze" for the linked issue type in the "If" condition.

1 answer

1 accepted

1 vote
Answer accepted
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.
February 12, 2021

Hi @Richard Wright 

I just tried your scenario, using Blocks, and it worked for me.  Have you tried to include both directions of the link in the If condition, in and outbound?

Best regards,

Bill

Richard Wright February 12, 2021

Hi @Bill Sheboy ,

I did just give that a try and the field still gets changed even though there is another "Automated in Bronze" linked issue.

I appreciate the suggestion!

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.
February 12, 2021

Hmmm... I wonder if there is something else happening.

Have you looked at the audit log for the rule and the history for the impacted issue to see if something you do not expect is occuring?

Have you confirmed there are no extra link types with similar names? (e.g. extra white-space)

Another brute-force way to try this is to join the links names into a string...

{{#issue.issuelinks}}{{type.name}}{{^last}}, {{/}}{{/}}

and then check for the word "Bronze" being absent to clear the setting.  Seems overkill when the links should work with those dedicated automation tests and actions.

Richard Wright February 12, 2021

After a few errors of troubleshooting and trial and error, I ended up using your brute force method which worked. I'm really at a loss as to why I couldn't get the built-in functionality to work. I'll chalk it up to my lack of experience in Jira. Thank you @Bill Sheboy for the assistance.

For anyone that comes across this question in the future, I added the following rule in place of the "Linked Issues not present" step in my original image:

Screen Shot 2021-02-12 at 4.14.35 PM.png

Like Bill Sheboy likes this
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.
February 16, 2021

Hi, Richard.  I am glad that you got this to work, and I wonder if you have uncovered some edge case.  If so, please consider submitting a defect to Atlassian to learn why the built-in test didn't work for you on the links.  Thanks!

__Bill

Suggest an answer

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

Atlassian Community Events