Lokesh Purohit
Lokesh Purohit

Reputation: 533

In jira automation, can set a configure field of an issue to display its "is blocked by" issue?

In Jira I am trying to show in the swim lane card itself, on which issue it is blocked if blocked at all. For this I tried creating a configure field "Blocked by" and added it as a field to issue type Story.

Now I am trying to create automation that will trigger when a relation "blocks" or "is blocked by" is created. When such relation is created I want the field to get updated so that I can display it in Jira card.

For example: Issue B is blocked by Issue A, then In field "Blocked by" of issue A I want to display Issue B.

I already tried these steps:

  1. From project settings went to Automation.

  2. Selected "create rule"

  3. In rule: Trigger: When Issue linked. Linked types = Blocks Action: Then edit issue fields. Chose "Blocked by" from drop down. In value I gave {{issue}}.

  4. Save and Published.

  5. While testing, Set Issue B "is blocked by" Issue A it is updating the Issue B's "Blocked by" field with "Issue A", which exactly opposite of what I want.

  6. even if in the rule I change value to {{destinationIssue}}, then again its wrong as it puts value "Issue B" which is totally wrong.

enter image description here

Upvotes: 0

Views: 1220

Answers (1)

Lokesh Purohit
Lokesh Purohit

Reputation: 533

So finally its resolved. I got good directions from the Community leader of below Atlassian community. Atlassian Community page

Answer lies in three steps.

  1. first, is to trigger on issue type Linked (see picture) enter image description here
  2. second, branch on rule / related issues and select Type of issue as "Destination issue" (this realy makes sense if we want to update destination issue). enter image description here
  3. Third, then selecting "Edit issue" action chose the field to set as, "Blocked by" (or any other you want). Then in value add this without quote "{{triggerIssue}} {{issue.Blocked by}}" enter image description here

Note: {{triggerIssue}} here is the one that gets updated for first time. If we create "blocked by" relation again it got appended by {{issue. Blocked by}} Note2: Before all this I added "Blocked by" as one of the custom fields.

This field then I added on the card layout. Very good to have the Blocked by issue on the card of a particular issue on kanban board.

Upvotes: 0

Related Questions