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?
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.
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.
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:
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.
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:
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event