Forums

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

Sum Task Story Points Split from Story

Evan Turner November 23, 2023

Using Jira Automation, I would like to sum Story Points on all Tasks linked to a Story with link type = "split to", then update the Story Points on the Story with that summed total. I cant seem to get a smart value to work. Ive tried variations for example {{issue.task.Story Points.sum}} but all fail to update the Story.

Here is my automation 

When: Value changes for

- Story Points

Issue Type equals

- Task

For: Linked issues (Branch)

-Types: split from

If: Linked issues present

-Types: split to

Then: Edit issue fields

- Story Points (smart value - {{issue.task.Story Points.sum}} )

1 answer

1 accepted

1 vote
Answer accepted
Ste Wright
Community Champion
November 23, 2023

Hi @Evan Turner 

This should work...

  • Trigger: Field Value Changed
    • Field to Monitor = Story Points
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = equals
    • Value = Task
  • Condition: Related Issues Condition
    • Related Issues = Linked Issues
    • Link Types = split from
    • Condition = Are present
  • Action: Lookup Issues
    • JQL - issue in linkedIssues("{{triggerIssue.key}}","split from")
  • Action: Create Variable
    • Name = storyKey
    • Smart Value = {{lookupIssues.first.key}}
  • Action: Re-fetch Issue Data
  • Action: Lookup Issues
    • JQL - issue in linkedIssues("{{storyKey}}","split to")
  • Branch: Related Issues
    • Type = Linked Issues
    • Link Types = split from
      • Action: Edit Issue
        • Field = Story Points
          • Value = {{lookupIssues.Story Points.sum|0}}

---

A few notes...

  • I believe I have the link types the right way around - Stories are split to Tasks, Tasks are split from Stories?
  • To do the required lookup (i.e all the Story's split to Tasks), we had to an initial lookup to find a single Story Key - this rule does assume there's only ever 1 Story

---

Let us know if this works for you!

Ste

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 23, 2023

Hi @Ste Wright 

What is the purpose of the Re-fetch Issue action in your rule example?  Thanks!

 

Kind regards,
Bill

Ste Wright
Community Champion
November 23, 2023

Hi @Bill Sheboy 

It's probably not needed - it was a "just in case" re-fetch to ensure the rule stayed in order :)

Ste

Like • Bill Sheboy likes this
Evan Turner November 23, 2023

Thank you so much @Ste Wright that worked great.

Is it possible to also modify this to sum all story points on Requirements (children) to the Epic (parent) too? 

Ste Wright
Community Champion
November 23, 2023

Hi @Evan Turner 

That would likely be a second rule - but this should work:

  • Trigger: Field Value Changed
    • Field to Monitor = Story Points
  • Condition: Issue Fields Condition
    • Field = Issue Type
    • Condition = is one of
    • Value = Task, Story, Bug - i.e Epic children
  • Condition: Related Issues Condition
    • Related Issues = Parent
    • Condition = Exists
  • Action: Lookup Issues
    • JQL - parent = {{issue.parent.key}}
  • Branch: Related Issues
    • Type = Parent
      • Action: Edit Issue
        • Field = Story Points
          • Value = {{lookupIssues.Story Points.sum|0}}

---

A few notes on this rule:

  • I've used "Parent" instead of Epic, which should work (it did when I tested this) - this future proofs the rule, with Epic Link being deprecated.
  • If this rule could be activated by the first rule, you need to allow that to happen:
    • Go to Rule Details
    • Select the "Allow rule trigger" checkbox (it's called "Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.")
    • Re-publish the rule

---

Let us know what you think!

Ste

Like • Evan Turner likes this
Evan Turner November 23, 2023 edited

Legend @Ste Wright  thanks so much. Works brilliantly.

Like • Ste Wright likes this
Darby Kim July 25, 2024 edited

@Ste Wright This automation is not working for me. Could I get some help?

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.
July 25, 2024

Hi @Darby Kim -- Welcome to the Atlassian Community!

As this is an older thread, please create a new question, and perhaps link back to this one.  That will ensure the maximum number of community members see it to offer suggestions.

When you post your question, please include:

  • describe the problem you are trying to solve; that is, "why do this";
  • indicate which version of Jira you are using: Cloud, Server, or Data Center;
  • indicate what type of project you are using and the rule scope;
  • post an image of your complete automation rule;
  • post images of any relevant actions / conditions / branches;
  • post an image of the audit log details showing the rule execution; and
  • explain what is not working as expected. 

Those will provide context for the community to offer ideas.  Thanks!

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events