Can I flag an issue was a bug is related to it with automation?

Luiz Alves Filho December 7, 2020

Every time a bug is created and that bug relates to an issue on the active sprint, then that issue is flagged and only can transition into done once the bug is fixed (status = Done).

Is there a way to automate the flagging of an issue with a related bug to it?

1 answer

1 accepted

0 votes
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 7, 2020

Hi @Luiz Alves Filho 

Maybe...  How do you know a defect (bug) is related to another issue within Jira?

If it is a sub-task type or is linked to the "parent" issue then you should be able to use an automation rule to detect the condition and then flag it.  You would also configure your workflow to check for the blocking item before allowing a parent to transition to done.

Best regards,

Bill

Luiz Alves Filho December 8, 2020

We link bugs (issueType = Bug) with the related user stories (issueType = Story).

But I can't find a way to do it on automation yet!

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 8, 2020

Hi @Luiz Alves Filho 

If you are manually linking when you create the Bug, you can then use automation to set the flag (edit issue, setting the Flagged field to True).

If you are looking for a way to automatically link the Bug to the Story, using automation, you would need some way to uniquely identify the Story for the link to the Bug.  Otherwise, there would be no way for automation to do this.

__Bill

Luiz Alves Filho December 8, 2020

Bill,

That's exactly what I want to do. Flagged automatically a story which has a bug related to it. But I'm trying to automate it but without success.

Do you have any ideas on how to do it?

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 8, 2020

Thanks for clarifying.  Okay, I will assume when you create a bug, that you link it to a story before saving.  If so, this will do it:

  • Trigger: Issue Created
  • Condition: Issue Type equals Bug
  • Branch: For linked issues to the triggering issue 
    • Condition: Issue Type equals Story
    • Edit issue: set Flagged to TRUE

If you are using a specific link type (such as blocked), you can add that to the branch check.

If you create a bug and later add the link to the story, you could copy this to another rule, with a trigger of Issue Linked.

Like Luiz Alves Filho likes this
Luiz Alves Filho December 9, 2020

Bill,

I'll try it and let you know if it worked.

Thanks!

Luiz Alves Filho December 9, 2020

Bill,

This is how I created the automation. The audit log shows that it worked. But the Flag was not added to the related Story.

 

jira automation.png

 

Maybe the problem is on the last part of the automation. I'm not sure which one to select.

What do you think?

jira automation 2.pngjira automation 3.png

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 9, 2020

You almost have it done... you want to set Flagged to TRUE in the Edit Issue.

Luiz Alves Filho December 9, 2020

I can't find that option :(

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 9, 2020

Hmmm...  I just recreated that rule, and I found it.  Try this.  Delete the edit, save your rule, publish, disable it (just in case...) and then try to re-add the Edit Issue.

Flagged as true.PNG

Luiz Alves Filho December 9, 2020

Bill, 

Do you think I need to do some editing on advance filed section? Because I can't find the "true" option. The only options are the following ones:

JIRA AUTO.pngAUTO JIRA 2.png

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 9, 2020

Please try to just type TRUE, and tab off the field.  That worked for me.

Luiz Alves Filho December 9, 2020

Tried, but nothing happens :(

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 9, 2020

Argh!  That is unfortunate... At some time in the past, I typed in TRUE and it has just worked since then, becoming available in the drop-down list.  

Updated: the JSON advanced edit does not appear to work for the Flagged field.  I'm still experimenting with it to understand why...

Something's up and it may be time to submit a support ticket:

https://support.atlassian.com/contact/#/

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 9, 2020

Hey, @Luiz Alves Filho 

One more thing to try: select Impediment from the dropdown for edit of Flagged.

I found an older post where TRUE worked for some people and Impediment worked for others.  Odd that both work for me.

Like Luiz Alves Filho likes this
Luiz Alves Filho December 10, 2020

It worked with the impediment!

Thanks a lot @Bill Sheboy

 

Next Automation will be to remove the flag when the linked bug transitions to "Done". Let's see if I can handle it! haha

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events