I need to update the story point of an "Initiative" as the sum of the "linked" epics

Apoorva Pahuja November 29, 2021

I need to update the story point of an "Initiative" as the sum of the "linked" epics. So epics are linked to the initiative (not as a subtask but as a link). Whenever the story point of the epics change, the change should get reflected in the way that the sum of story points of all the linked epics should be = story point of the initiative

 

1.  When: the value of story points changes

 

2. If the issue type is epic and there are linked issues

 

3. For the linked issues (which means the for initiative}

 

Story point  = {{issue.issuelinks.Story Point.sum}}

 

However, this is not working. The story point for the initiative is zero even when the story point for epic has values

 

This is similar to what was done here 

 

https://www.atlassian.com/software/jira/automation-template-library/sum-up-story-points

Please help, urgent!

 

6 answers

1 vote
Apoorva Pahuja December 3, 2021

 

 

Thanks, so finally these rules worked. 

Now I am able to sum subtasks to 1. user stories/task level, then another rule to go from 2. user story to epic level and then one from 3. epic to initiative (linked, not through hierarchy)

 

These rules are working very well individually, but are not working together, so when #1 runs, the #2 doesn't get triggered automatically even if story points are getting changed at a story level. But when I manually change the story points of the user story, the #2 works.

 

Ideally since the trigger is change of story points, the rules should run whether the change is done manually or by another automation rule . Could you please help?

0 votes
Jordan Richter October 17, 2023

This works for me.Story points from Epics to Initiative.png


0 votes
Eli Solutions Team -Eli Solutions-
Atlassian Partner
January 28, 2022
0 votes
Apoorva Pahuja November 30, 2021

There are no errors, the rule is successful, but the sum is not happening, the story point value is 0

 

See rule below:
Snapshot.png

0 votes
Curt Holley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 29, 2021

Are you talking about "parent link" (I.E. the epics that are children of the initiative) or just standard JIRA "linked issues"?
As, using the "Parent link" field with an Advanced Roadmap plan and Story points "rolled-up" feature enabled means you can get the affect of "summing", without the need to automate at all.
See below "Roll-up" checkbox to tick and Story points column with "rolled-up" story points from the children (denoted by the up arrow)

Screenshot 2021-11-30 104648.png

Apoorva Pahuja November 30, 2021

I am using the general links. 

Curt Holley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2021

In that case I have to wonder if it would make may sense to change tack and make children of the Initiative??

If these Epics are so crucial to this initiative that you want to derive its Story point total, then surely they should be hierarchically linked (using the Parent link field).
This would be playing to Jira's strengths and would enable not only the story point summing you desire, but also better, more logical and easier to create and maintain views in Advanced roadmaps. It would also make writing your automation rule easier.

May I also ask, if these Epics are not the children of the Initiative, then which ones are? and how do they differ to these ones? Why would they not all be part of the Initiatives hierarchy?

0 votes
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.
November 29, 2021

Hi @Apoorva Pahuja -- Welcome to the Atlassian Community!

Please post images of your complete rule and the audit log show details where the rule does not work as you expect.  That may provide context for what is happening.  Thanks!

In the mean time, consider adding some log statements in your rule to confirm the values you are trying to sum/set are what you expect.

Kind regards,
Bill

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.
November 30, 2021

Thanks for the image of your rule.  I believe that {{issue.issuelinks}} only contains the keys and not the rest of the data (such as story points).  You could confirm this by writing the following to the log in that branch to learn if any values are shown:

{{#issue.issuelinks}} {{Story points}} {{/}}

And even if that did work, your branch's scope would be updating the story points of the epics.  You would then need to accumulate the values for the epics to store a total in the initiative.

Apoorva Pahuja December 1, 2021

Thanks, How should I do the sum ?
{{#issue.issuelinks}} {{Story points}} {{/}.sum} ?

Similarly, what is the smart value to point the stories linked to epic as epic links.. for example for epic (parent), the story point = sum of story points of all the linked stories?

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.
December 1, 2021

First, I was suggesting to try logging the values without summation.  That will confirm if the values are even present.  If so, then investigate why they are not summing.  If not, you will need another way to access them, such as a branch on JQL.

Next, the connection between epics and child issues depends upon your project type: company-managed or team-managed.

  • For company-managed, that is epic link
  • For team-managed, that is parent

In either case, if you are using branches the automation rule handles this for you.  If instead you are branching on JQL, use the appropriate connection field, epic link or parent.  For example if the trigger issue is an epic, to find its children with JQL would be:

"Epic Link" = {{triggerIssue.key}}

Apoorva Pahuja December 2, 2021

{{#issue.issuelinks}} {{Story points}} {{/}} is not working. There are no errors but the story point field is updated to "None" instead of the actual value


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.
December 2, 2021

Thanks for that information.  That means the issue links only contain the keys, as I suggested.  To sum up the story points for linked issues you may to use another method, such as Lookup Issues with JQL on the list of issue link keys:

key IN ( {{#issue.issuelinks}} {{key}} {{^last}} , {{/}} {{/}} )

With that for the lookup's JQL, you may get the sum from:

{{lookupIssues.Story points.sum}}
Like Apoorva Pahuja likes this
Apoorva Pahuja December 3, 2021

 

 

Thanks, so finally these rules worked. 

Now I am able to sum subtasks to 1. user stories/task level, then another rule to go from 2. user story to epic level and then one from 3. epic to initiative (linked, not through hierarchy)

 

These rules are working very well individually, but are not working together, so when #1 runs, the #2 doesn't get triggered automatically even if story points are getting changed at a story level. But when I manually change the story points of the user story, the #2 works.

 

Ideally, since the trigger is change of story points, the rules should run whether the change is done manually or by another automation rule . Could you please help?

Apoorva Pahuja December 3, 2021

All the rules are attachedEpics to initiatives.pngStories to epics.pngSubtasks to Stories.png

Apoorva Pahuja December 3, 2021

Just to also clarify, when i run the subtasks rule, the #2 and #3 rule logs say that only the user story points of the subtask has changed, it doesn't even take into account the story point change for the user story using the automation rule when #1 runs

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.
December 3, 2021

Hi @Apoorva Pahuja 

When your use case requires a change made by rule #1 to trigger another rule (e.g. rule #2), look in the details section of rule #2 and enable "Allow Rule Trigger".  This is disabled by default to prevent a looping/runaway situation in rule execution.

After enabling this option, keep a close watch on the rule for a while to ensure it is not looping or using up your instance usage limits for automation.

Apoorva Pahuja December 6, 2021

Thanks, its working

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events