Hi Atlassian Community,
I am an administrator of Jira Work and I am facing an issue with an automation rule I created. My goal is to automatically sum the Story Points from all Sub-tasks and update the parent Story with the total.
Here is the rule setup:
Trigger: When an item is updated
Condition: Issue type equals Sub-task
Action: Lookup issues with JQL:
parent = {{issue.parent.key}} AND issuetype = Sub-tarefa
Action: Create a variable with smart value:
{{lookupIssues.Story Points.sum}}
Action: Edit the parent Story’s Story Points field with the created variable:
{{totalPontosDeHistoria}}
Despite setting up the rule as described and shown in the attached screenshots, it’s not working. The expected outcome is that the total Story Points from all Sub-tasks should be summed and reflected in the parent Story’s Story Points field, but this isn’t happening.
I have tried multiple adjustments to the rule, but it still doesn't function as intended.
Any insights or suggestions on what might be going wrong or how to fix this would be greatly appreciated.
Thank you!
@Trudy Claspill
Thanks for the helpful answer.
You see, I tried adding the Branch as you suggested. Even then it still didn't work properly. I'll post another screenshot of the problem here. If you could be so kind as to point me in another direction, I'd be forever grateful.
the rules are written in Portuguese, my native language. here is the caption
Pai = Parent
Existe = Exist
Hello @Nicholas Loureiro
Welcome to the Atlassian community.
The problem is that you have not changed the focus within the rule from the Subtask that triggered the rule to the Subtask's parent.
One method to solve this is
Trigger: When an item is updated
Condition: Issue type equals Sub-task
Action: Lookup issues with JQL:
parent = {{issue.key}} AND issuetype = Sub-tarefa
Action: Edit the parent Story’s Story Points field
{{lookupIssues.Story Points.sum}}
Using the Branch changes the focus of the rule to the parent. Within in the branch {{issue}} then refers to the parent issue rather than the trigger issue. And any actions/conditions added within the branch are executed against the parent issue unless otherwise specified.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Nicholas Loureiro
The new screen image you posted does not show that you added a branch. It shows that you added a condition. A rule with a branch would look like this:
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.