Add Label to Trigger Issue When Issue is Blocked By another Issue

eric.spink December 16, 2021

Hi,

Using Jira Automation, is it possible to Add a label to a trigger issue when you add a Blocked By Link to the trigger story?

 

My current rule is:

When Issue Link, Types Blocks

Edit Issue Field, add Label.

I also tried doing the following in Advanced Editing:

{
"update": {
"labels": [{
"add": "Blocked"
}]
}
}

When this rule runs, it only adds a label to the issue I am linking too. I am looking to only add the label to the issue I made the link in.

Thank you in advance.

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.
December 16, 2021

Hi @eric.spink -- Welcome to the Atlassian Community!

Please take a look at the description of that trigger in the rule editor:

Rule executes when an issue is linked to another issue. {{issue}} will always refer to the source issue, so if ISSUE-A is blocked by ISSUE-B, this rule will execute on ISSUE-B. To access ISSUE-A, use {{destinationIssue}}, and to access the link type, use {{linkType}} (e.g. {{linkType}}

To do what you ask, I think you add a branch on the destination issue, such as:

  • trigger: issue linked, type blocks
  • branch: destination issue
    • action: edit to add the label using the add/remove values option

If that does not work, you may instead need to make a JQL statement on the linked issue, and branch on that to perform the edit.

Kind regards,
Bill

eric.spink December 21, 2021

This works. Thanks!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events