Forums

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

To update "Blocked By" through automation when a blocked by relation is created between 2 tickets

Lokeshpurohut June 28, 2023

What I want is to achieve is this;

When issue "B" is blocked by issue "A" then

In the field "Blocked by" of ticket "B" automatically update with issue A .

So far, I created and added the "Blocked by" field which is different than the issue links "is blocked by". I want this to be updated when we create a "blocks" relation from A to B or "is blocked by" relation from B to A.

But I am not able to achieve this by automation.
I tried using Trigger "Issue linked" but failed to do so.

1 answer

1 accepted

2 votes
Answer accepted
Sachin Dhamale
Community Champion
June 28, 2023

@Lokeshpurohut ,

 

Welcome to the Atlassian Community !!

"Blocked by" Is this a Custom Field which you want to update?

Sachin Dhamale
Community Champion
June 28, 2023

@Lokeshpurohut ,

 

You need to add the automation rule like this to update the your Blocked by custom field

Linking.png

 

Update Issue.png

 

In the Edit Issue use the smart value to get the source issue or destination lssue key in the custom field

{{issue}} - source issue,
{{destinationIssue}} - for destination issue

 

Accept the answer if it helps

Like # people like this
Lokeshpurohut June 28, 2023

Thank you for the answer. That clarifies I am on right track.

Your answer helped me 50%

I put this in the field. {{issue}} blocking {{destinationIssue}}

It really updates the {{issue}} "Blocked by" field.

I want the "Blocked by" field of {{destinationIssue}} to be updted. Both of them have this field.

 

If A blocks B
then Blocked by or any other field I wanto update in Issue B. Because we want to know in Jira swimlane view what is blocking B, even if A is in some other sprint or backlog we may not want to see that.

Sachin Dhamale
Community Champion
June 28, 2023

Hi @Lokeshpurohut ,

 

For that you need to add Branch Rule /Related Issue Component and then action component like this 

Destination Issue.png

Like # people like this
Lokeshpurohut June 29, 2023

Thanks Sachin,

This one works perfect. Many thanks.

Lokeshpurohut June 29, 2023

Sorry, I commenteed too early. One issue here. Now I am able to update the destination issue but we are losing information about the triggerIssue or main issue.

Once we enter in Branch of Destination issue, {{issue}} and {{destinationIssue}} are same
so still I am not able to update which issue is blocking issue B, instead its displaying

B blocking B for expression "{{issue}} blocking {{destinationIssue}}" used.

Lokeshpurohut June 30, 2023

@Sachin Dhamale 

Sorry I have to ask again the above method loses information about

{{issue}}  if we enter into Branch rule.

There it just updates "B is blocking B" in my case when using

"{{issue}} blocking {{destinationIssue}}" (looks like both got same value somehow)

In screen shot you will see I also tried using a variable blocking_issue assigning it {{issue}} but that is also appearing blank in the final output when I use
blocking_issue or {{triggerIssue.blocking_issue}}.

Appreciate your help. I am able to update the field of Destination issue with above trick you suggested. This last hurdle is trickier.

jira_issue_2.jpg

 

Lokeshpurohut June 30, 2023

This later resolved by using {{triggerIssue}} inside the Branch of Desitnation issue.

Now all sorted out.

Suggest an answer

Log in or Sign up to answer