Forums

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

Changing a specific linked issue to a different type (Automation)

Oliver Vistisen
Contributor
August 6, 2020

I am trying to automatically change the type of link ('Blocks' -> 'Relates')  between two tickets when one of them is set to Done. This is so that I can tell when blockers from other projects are no longer an issue.

The logic below gets us very close, but there is a problem on the final step. There is no option to change the specific link between the two tickets. So I am creating a 'Relates' link between the two first, before trying to remove the original link. 

Unfortunately, it removes ALL links of the 'Blocks' type, not just the one between these two tickets. Other Blockers are also removed which wont do.

Any way I can change the link type directly at the trigger issue? or avoid bulk changes by link type?

Capture.JPG

1 answer

1 accepted

1 vote
Answer accepted
Ste Wright
Community Champion
August 6, 2020

Hi @Oliver Vistisen 

Can I clarify the need here:

  • Two issues are linked together using "blocks / is blocked by"
  • If Issue A blocks Issue B, and Issue A is resolved - it should remove the "blocks" relationship and created a "relates to" relationship
  • If Issue B "is blocked by" multiple issues, the other block linkages should not be removed

If this is the case, this is how I got it working in our instance:

  1. For the Trigger, use Issue Transitioned (to Done)
  2. Next, create a Branch. Set the related issues type to "Linked Issues", looking for link types "blocks"
  3. Under this Branch, create an Action - Link Issues. Choose the appropriate replacement link type (eg. "relates to") and choose to link it back to the Trigger Issue
  4. Next, create a second Branch. Set the related issue type to "Current Issue"
  5. Add a Condition - Related Issues Condition. Check for Linked Issues, specifically that the link type "blocks" is present
  6. Finally, add an Action under this Branch - Delete Issue Link(s)

You can modify this rule to include your additional link types.

The rule first seeks out the issue the trigger issue links outwards to, and adds the new link type. It then looks for the old link type on the trigger issue and removes it.

It's important to have the first branch above the second - if these were the opposite way around, the relationship between the two issues would be removed and not possible to use to add the "new" relationship.

Let us know if this suits your use case - or please clarify the need above :)

Ste

Oliver Vistisen
Contributor
August 7, 2020

Thank you Stephen, you were spot on with the clarification and solution! It works a charm :)

Capture.JPG 

Like Ste Wright likes this

Suggest an answer

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

Atlassian Community Events