Forums

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

Automation Rule to Sum Story Points from Sub-tasks to Parent Story Not Working

Daniel Gustavo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 29, 2024

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:

  1. Trigger: When an item is updated

  2. Condition: Issue type equals Sub-task

  3. Action: Lookup issues with JQL:

    parent = {{issue.parent.key}} AND issuetype = Sub-tarefa
    
    
  4. Action: Create a variable with smart value:

    {{lookupIssues.Story Points.sum}}
    
    
  5. 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!



1.png2.png3.png4.png5.png6.png

2 answers

0 votes
Daniel Gustavo
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 31, 2024

@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 = ExistCaptura de tela 2024-05-31 103431.png

0 votes
Trudy Claspill
Community Champion
May 29, 2024

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

  1. Trigger: When an item is updated

  2. Condition: Issue type equals Sub-task

  3. Branch: For Each Related Issue: Parent
    1. Action: Lookup issues with JQL:

      parent = {{issue.key}} AND issuetype = Sub-tarefa
      
      
    2. 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.

Trudy Claspill
Community Champion
May 31, 2024

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:

Screenshot 2024-05-31 at 8.10.22 AM.png

 

Screenshot 2024-05-31 at 8.12.13 AM.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events