Hi,
Hoping somebody can assist with this!
Jira Cloud - Company Managed project
The problem I am trying to solve is how to automate linking of Bugs to the Epic they belong to (based on the Story they are linked to). We have been linking Bugs manually to the Epics because we wanted to have a view for any given Epic, which Bugs relate to it.
We are using the following hierarchy/linking:
I have been looking for a way to automate the linking of Bugs to the relevant Epic but so far unsuccessful. The business logic would be as follows I think:
Thanks in advance!
Hello @louise.simmonds
Can you show us the rule you have tried to build and tell us how it is not meeting your needs? Also, please show the Audit Log for the execution of the rule.
I have a rule that works for this, but I'd like to help you learn by helping you debug what you have.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi - thank you, I don't have any rule at the moment. My automation experience in Jira Software Cloud is limited as I have spent most of my time on Server!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, well, I encourage you to take a look at the documentation:
...and maybe set up a test project where you can experiment with rules. There is a library of prebuilt rules that you can reference also.
You picked a tricky rule for your first attempt! :-)
I'll summarize the steps:
TRIGGER: WHEN an issue link is created of the Link Type "blocks"
...add other conditions to make sure you want to continue
CONDITION: the type of the issue causing the block is Bug
CONDITION: the type of the issue being blocked is Story
CONDITION: the blocked Story has a parent Epic
ACTION: Create a link of type "blocks" between the Bug and the Epic
What makes this tricky is that the Issue Linked trigger concerns two issues, and you have to understand how to reference each issue in the Conditions and Actions of the rule. The trigger gives you an explanation of this:
You will have to use the Smart Value (things in curly braces) in the Trigger description later to reference information in the Bug and Story issues that were linked.
(I'm going to post this in pieces as it will take me a while to write it all down.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(Part 2)
I like to use the Log action to print values to the Audit Log for the Rule so that I know what values the rule is working with.
We want to confirm that the issue causing the Block is a Bug, and the issue being Blocked is a Story. Referencing the description of the trigger, the issue causing the block can be referenced with the {{issue}} smart value, and the issue getting blocked can be referenced with the {{destinationIssue}} smart value. So, I log the values for the Issue Keys and Issue Type of each of those.
Next I log the value for the blocked issue's Epic Link field.
When the rule is run, you'll be able to see all this information in the Audit Log.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
(Part 3)
Next we add the conditions to check that the event that triggered the rule was a link created between a Bug and a Story.
And then check that the blocked issue has a value in the Epic Link field (which is where the issue key for the parent Epic is stored).
If those three conditions pass, then the next step in the rule will execute - the action to create a link between the Bug and the Story's parent Epic.
To make this a little simpler to read, here is the rule without all the Log actions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much for taking the time to respond in such detail! Appreciate it is a complicated automation to attempt as a newbie to automation in Cloud :-)
I'll replicate and will let you know how I get on.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.