How to sum SubTasks story Points and compare with Story SP

Vikas Srivastava June 14, 2023

I have to write an automation rule which will do the following

 

Trigger -  When a story is re-estimated (Story Point is updated)

1. Sum all SP from SubTasks which are not one or Cancelled

2. Compare with Story SP

3. If mismatch is there then write a comment. 

 

e,g,

User Story Story point = 4

  SubTask 1 - Status In Progress  - Story Point = 2

  SubTask 2 - Status Cancelled  - Story Point = 2

  SubTask 3 - Status In Progress  - Story Point = 4

 

Since there is mismatch between Parent US (4) and Sum and Active SubTasks (6) I want to put a comment. 

 

I could compare 

SubTasks points {{issue.subtasks.Story Points.sum}}  AND Story Point {{issue.Story Points}}. But how to exclude Done or Cancelled SubTasks is something I am not able to figure out. 

I am sure it is simple tweak. :-)

Please help.  

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2023

Hello @Vikas Srivastava 

Welcome to the Atlassian community.

Please show us your complete automation rule as you have currently built it.

How are you intending for this rule to be triggered?

Vikas Srivastava June 14, 2023

Just added a snapshot. 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2023

After the Condition where you are checking the Status of the trigger issue you can add a Lookup Issue Action to lookup the subtasks of that issue based on a JQL statement, retrieving only the subtasks that are not in a Cancelled status.

You could then use the smart value {{lookupIssues.Story Points.sum}} in the Compare Values condition rather than {{issue.subtasks.Story Points.sum}}

Like Vikas Srivastava likes this
Vikas Srivastava June 14, 2023

let me try :-)

Like Trudy Claspill likes this
Vikas Srivastava June 14, 2023

It worked. Thanks a lot. 

Like Trudy Claspill likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 14, 2023

I'm glad I could help you.

If your problem has been solved, please consider marking the Answer as Accepted.

Vikas Srivastava June 15, 2023

Hi Trudy, 

Now, I have to run the same rule on all stories at a scheduled time to get a report out of all the mismatches. 

I have the JQL for getting the get impacted stories and compare then report all issues in an email to me. 

image.pngimage.png

Like Trudy Claspill likes this
0 votes
Vikas Srivastava June 14, 2023

image.png

Suggest an answer

Log in or Sign up to answer