Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove linked issue after moving the issue into Done

Елена Елена
Contributor
June 18, 2024

Hello,

 

I want to make the following automation rule:

1. We have issue which blocks another one, so it has blocked linked issue.

2. when this user story has "Done" status:

2.1. Blocked issue converted into relates to

2.2. Blocked issue removed from the card.

I made this rule, but blocked issue is not removed

Screenshot 2024-06-18 at 12.12.28.png

Screenshot 2024-06-18 at 12.22.29.png

Screenshot 2024-06-18 at 12.23.20.pngScreenshot 2024-06-18 at 12.23.29.png

3 answers

1 accepted

0 votes
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.
June 18, 2024

Hi @Елена Елена 

Your rule is making two edits to the same issue and so it is likely the updates are colliding.

I recommend these changes to your rule:

  • Perform the Delete Link action first
  • After that, add a Re-fetch Issue action to reload the issue data
  • Replace the Issue Edit action with the Link Issues action to add the "relates to" link

Kind regards,
Bill

Елена Елена
Contributor
June 19, 2024

@Bill Sheboy , thanks for the reply.

But Blocks and Blocked by are not deleted after moving the story to Done

 

Screenshot 2024-06-19 at 12.26.54.png

Screenshot 2024-06-19 at 12.28.15.png

Screenshot 2024-06-19 at 12.30.28.png

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.
June 26, 2024

Please note...

  1. when the branch runs, it is looking for linked issues from the trigger issue's perspective of "blocks"
  2. when the Delete Issue Link runs inside the branch, it is looking for links from the linked-to issue's perspective for "blocks"

I believe the second one is incorrect.  This type of link is directional, and so the Delete Issue Link should instead try deleting "is blocked by".

 

Also please note: the Delete Issue Link action will delete all links of that type from the issue, regardless of to which issue they are linked.  It will not only delete the link to the trigger issue.

And so if you have more links, the rule will need to be more discerning: rather than using the Delete Issue Link, it would use the Send Web Request action to call the REST API endpoint to delete the specific link, using its link id value.

0 votes
Елена Елена
Contributor
June 18, 2024

xx

0 votes
Dave Mathijs
Community Champion
June 18, 2024

Hi @Елена Елена What does the audit log say when this rule is triggered?

Елена Елена
Contributor
June 18, 2024

Screenshot 2024-06-18 at 15.12.49.png

I see only this

Dave Mathijs
Community Champion
June 18, 2024

Looking at the audit log, the automation rule was executed successfully.

So, KN-2 blocks KN-1, correct? Is KN-2 still linked to KN-1 after KN-1 was transitioned to status 'Done'?

 

Елена Елена
Contributor
June 18, 2024

KN-2 blocked by KN-1, and I moved KN-1 to Done

Suggest an answer

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

Atlassian Community Events