Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,636
Community Members
 
Community Events
168
Community Groups

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

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!

 

5 answers

 

 

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?

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

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

I am using the general links. 

Curt Holley Community Leader Nov 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

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

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.

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?

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}}

{{#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


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

 

 

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?

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

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

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.

Thanks, its working

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events