Story point completion rate not getting correctly calculated

Saili
Contributor
June 10, 2024

We have these 2 automation in place for tracking our EPIC progress. BUt the problem is whenever we delete or move any child issue from that EPIC then the story points of it are still getting considered in the 'Story points completed'. 'Story points total' is getting changed. Due to this the completion rate in % of the EPIC is getting displayed incorrect. This incorrect data is also then getting reflected in our Salesforce end. Please let me know how can I correct this. As in the EPIC life cycle there are supposed to be many changes in the child issues which is now being a problem in calculation of its completion rate.2024-06-10_13h46_01.png2024-06-10_13h46_22.png

2 answers

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2024

Hi @Saili 

First thing, how are you linking Epics to their child issues: using the built-in mechanism with the parent field in the child issues or some other way (e.g., with issue links)?  The two rules you show indicate both methods, and so I hypothesize your existing rules do not work as you explain.

Back to your original question...

If an child issue is closed, that implies it is completed.  Why would a completed child issue be moved to another parent Epic or deleted from Jira?

Assuming there is a valid scenario for doing this, you will need two additional rules to handle those cases:

  • One triggered on a change to the parent field, and then both the current and previous epics will need updates to their total story points
  • One triggered on issue delete, and then the previous epic will need an update to the total story points

Kind regards,
Bill

Saili
Contributor
June 17, 2024

Dear @Bill Sheboy  @Stevan Mandić 

I m sorry for mentioning closed issues. 

Also we wish to calculate the story points from issues which are linked using built in mechanism and not with the option of 'linked issues'.
So when any child issue is moved or a linked issue is added, at that time the calculation is getting wrong. Can you please suggest a solution for this.

Thanks in Advance!

Saili

Saili
Contributor
June 17, 2024

There is also this automation in place which I suspect is not working fine too

2024-06-17_16h11_41.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 17, 2024

For the rule image you show immediately above this post ^^^

I assume the scheduled trigger uses JQL to find the epics, and the Lookup Issues action then tries to find the child issues of each epic for updates.

 

First, smart values are case-sensitive.  Please change the JQL in that Lookup Issues action to this:

parent = {{issue.key}} AND issuetype != Epic

 

 

Next, please show the details of the Edit Issue action to confirm the expression used to set the field.

If your project is Company-Managed, they use the "Story Points" field, with the smart value of {{issue.Story points}} and so the edit would probably use this:

{{lookupIssues.Story points.sum|0}}

 

If instead your project is Team-Managed, they use the "Story point estimate" field, with the smart value of {{issue.Story point estimate}} and so the edit would probably use this:

{{lookupIssues.Story point estimate.sum|0}}

 

Saili
Contributor
June 18, 2024

Also can you please let me know how to only consider the story points from parent child built in mechanism and not from the 'linked issues'.
Our project is company managed. Here are the edit details
2024-06-18_13h31_20.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2024

Please adjust the case to match what I posted earlier, including the default value of 0 when no issues have story point values:

{{lookupIssues.Story points.sum|0}}

 

The rule you showed using the Lookup Issues should work correctly to update the epic for the child issues. 

If it is not, please post an image of the audit log details showing the rule execution.

Saili
Contributor
June 21, 2024

I adjusted the case. But the main issue still exists where the story points from linked issue is still getting considered in the story point completed.

Can you please make a suggestion?

2024-06-21_11h29_23.png2024-06-21_11h32_26.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 21, 2024

Earlier you noted using the parent field to connect Epics to child issues.  This is the default, built-in behavior.  But your rule does not show that.

 

If you are using the built-in parent field, please update your rule as follows:

  • trigger: issue transitioned to Closed
  • condition: issue type is one of Story, Task, or Bug (and your other standard types)
  • branch: to Parent of the issue
    • action: lookup issues, with the JQL:
      • parent = {{triggerIssue.parent.key}} AND status = Closed
    • action: edit issue to update the field from the lookup results

 

0 votes
Stevan Mandić
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2024

Hi @Saili ,
As @Bill Sheboy said, you have inconsistent Epic-child linking (I suggest you use parent-child relation). Also I agree that you will need 2 additional rules: one for issue deletion and other for parent change.

I will provide a solution for parent change:

Prerequisites:

  • Built-in Parent-child relation through Parent field.
  • Add simple text custom field: LastParent

  • Create temporary scheduled automation (you only need to run it once) that populates children LastParent field with parent key (So initially, every issue has current parent key populated in LastParent field. The value of LastParent should be set to: {{issue.parent.key}}



Create an automation:


Screenshot 2024-06-10 at 19.03.14.png

*For Edit story points action(sum) use: {{lookupIssues.Story Points.sum}}

_______

This automation covers following scenarios:

  1. Child issue removed from epic - Calculation is performed on that epic
  2. child issue parent field changed from empty (parent set) - LastParent field is populated with the key of new parent and calculation is performed for Parent.
  3. Child issue moved from epic to another epic- Calculation is performed on both epics.
  4. Child issue created under epic - LastParent is populated with parent key
  5. Child created through create Button and story points set - LastParent is populated with parent key and calculation is performed on Parent epic.

*Also, use your 2 already created rules, and Create automation that will be triggered by child issue deletion.


Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events