I'm trying to create (or have our DevOps folks create) an automation rule where if an issue has any "Blocked" linked issues that are not closed, it will add the label "Blocker" to that parent issue.
It seems straight forward (pseudo rule description):
When triggered
For Linked issues
If blocked by Trigger issue
Then Edit Trigger issue field (add label: "Blocker")
This seems like something someone that has been done before to support simplified filters, but I cannot find an example to share with our DevOps folks to speed this up. Anyone done this already?
You can create a rule as in the screenshot below
The trigger is "Issue Linked" with type "blocks". The issue that blocks the linked issue is considered the source issue here, so that's the one we need to edit. To add a label, select action as "Edit Issue". In fields to set, choose "Labels". Then click on the 3-dots menu and select ADDREMOVE, and in "Values to add", add "Blocker".
Hope that helps!
It seems like this would only work when using the "Blocks" link vs the "Blocked By". Will either link direction trigger this rule on the "Blocks" issue?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Either direction will trigger the rule. The points to note are:
1. The issue that "blocks" will always be the main issue
2. If you want to add a label on the issue that "is blocked" as well, you can use a branch as in the image below
And then in the next step in the branch, you can add a label (say, "isBlocked") to the issue that is blocked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is extremely helpful information. If you don't mind humoring me for one more question, here it goes. We have a lot of tickets already linked but not labeled. can I use a nightly time trigger and "For: Linked issues", "If: Link type (blocked)", set label to accomplish the same behavior to address existing issues? Sorry for the pseudoscripting. I'm asking to help support our internal DevOps folks on this issue. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, a scheduled rule will work as well. However for finding all blockers, you would have to use JQL in the schedule. The JQL query to use would be
project="your-project" AND issueLinkType=blocks AND resolution = Unresolved
One caveat with this is that it returns blockers as well as those issues that are blocked on the blockers, and there's no way to separate them in the JQL. So, if you want to put different labels on blockers and blockees(?), you will need two branches:
1. One will be the same as the one above (for blockees)
2. In the second one, the link type would "is blocked by" instead of "blocks" (for the blockers).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.