Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How do you sum up story points to the epic using jira automation?

How do you sum up story points to the epic using jira automation?

 

Is there a consequence to summing up the story points to the epic level and updating the epic story points field value?

8 answers

1 accepted

1 vote
Answer accepted
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.
Jun 22, 2021 • edited

Hi @Neil Wills  -- Welcome to the Atlassian Community!

You can do that easily with the Lookup Issues action, using JQL to find the issues with your epic's key in their "epic link" field.  There is an example of that summation in the doc link I provided.

Regarding consequences of changing the epic's field, there may not be any.  Epics normally do not have story points and so I do not believe they are used in any built-in reports.

Best regards,

Bill

I noticed that I will have to be careful, if I sum up the points from stories to epics, and I include the epic in the sprint then it will affect the burndown and velocity reports,

 

I think as a team we will be keeping epics out of the sprint when they contain a number of stories and they are pointed.

Like Bill Sheboy likes this

Looking at the Epic history, I am resetting Story Points to None

I tried using:  

{{lookupIssues.Story Points.sum}}
Like Steve Caballero likes this
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.
Jul 06, 2021

Hi @Neil Wills 

Looking at your draft rule, I think you are missing some pieces to make this complete.  If your use case is "when the story points change for a story, update the parent to contain the sum for its children", consider this example rule:

  • trigger: field changes for story points
  • condition: issue type is not epic
  • condition: epic link is not empty
  • action: lookup issues on JQL where "epic link" = {{triggerIssue.epic link}}
  • branch: on epic parent
    • edit issue fields: setting the story points to {{lookupIssues.Story Points.sum}}

Of note: this works for a company-managed (classic) project.  If you are using a team-managed (next-gen) project, then:

  • substitute "parent" for "epic link"
  • substitute "Story Point estimate" for "Story Points"
Like Sven Reiser likes this

To confirm, this is a company manage project

I see that Epic Name is available, the field Epic Link is not listed in the dropdown

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.
Jul 06, 2021

Hi! To which dropdown are you referring?

I thought that the 'Issue fields condition' would have provided a field Epic Link, I used a SQL statement instead

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.
Jul 06, 2021

Did that then work for you?  If so, please consider marking this question as answered to help others find solutions faster.  Thank you!

This was my initial state, it would seem that this approach did not succeed in retrieving the stories related to the epic for the story was modified.  If you read above you will see that solved my use case with Bill's assistance using a difference approach.  Thank you

ruledef-didnotwork.JPGruledef-didnotwork2.JPG

I found my answer using a different approach, would still like to understand why my original approach did not work

 

How do you sum up story points to the epic using j... (atlassian.com)

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.
Jul 06, 2021

Hi, Neil.  Looking at your original rule, it appears you were missing the action to Lookup Issues with JQL before the Branch... That loads up the children of the epic, and then allows the ...sum to work for story points.

@Neil Wills @Bill Sheboy any suggestions on troubleshooting this function?

Automation appears to be set up correctly, audit log is registering successful events, but Story Points field is not being updated on the Epic.

Any ideas?

2022-01-24_15-24-59.png2022-01-24_15-25-55.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.
Jan 24, 2022 • edited

Hi @Jon Zacharias 

You appear to be matching on Epic Name, and not epic key for the match.  Please try changing your lookup issues JQL in the branch to:

project = {{triggerIssue.project.key}}
AND issueType IN ("story", "Change Request", "Improvement")
AND "Epic Link" = {{issue.key}}

Also, what is the value you are using in the edit?

Kind regards,
Bill

@Bill Sheboy I am in a CMP

And it looks like adding that {[triggerIssue.project}] worked!! How odd since I was seeing the audit log be successful..

The value I am using in the edit is when Story Points changes for Create Issue, Edit Issue

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.
Jan 24, 2022 • edited

That is good to learn. 

And I hope you caught my typo (wrong bracket type) in that smart value as it should have been:

{{triggerIssue.project.key}}

I will fix the post in case others use it.

@Bill Sheboy now this is not working again after I tried to clean up my JQL query to match yours?

Do you see anything that I messed up? This is the audit log message

pic1.pngpic2.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.
Jan 24, 2022

Oops...my bad!

{{triggerIssue.project}} is an object, and you only need the key.  Please update the JQL to use:

{{triggerIssue.project.key}}

You are the man! We are SO close :) 

Audit log looks good. Query is updated. Everything is looking good....except the Story Points field isn't actually getting updated!....

Any silver bullets for this last issue? 

 

pic3.pngpic4.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.
Jan 25, 2022

Would you please show what you are using for the edit value?  For example, to sum the values from a lookup issues I would use:

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

The |0 at the end handles the edge case of all of the values are empty (null), so return a zero.

Like Kevin likes this

@Bill Sheboy I believe I figured it out

I was using {{lookupIssue.Story points.sum}}

I updated it to {{lookupIssues.Story points.sum}}, and it seems to be working

Like # people like this

Thank you to both @Jon Zacharias and @Bill Sheboy for this detailed troubleshooting, it helped me implement this without issue. Cheers guys!

Like # people like this

Let me know if you run into continued issues

Hi @Bill Sheboy 

I am facing the same issue as the other guys. The Audit log status = success, it says that it successfully updated the Epic Story points field but it reality its NOT summing up - it is actually updated the story point to 0.

Attached are the pictures for your reference, please advice, thank you.

 

SP 2.PNGSP 1.PNGSP 3.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.
Jul 19, 2023

In the JQL for your Look Issues action, please try matching an Epic Link to a key, and not the name:

issueType IN (Story) AND "Epic Link" = {{triggerIssue.Epic Link}}

or

issueType IN (Story) AND "Epic Link" = {{issue.key}}

The second one should work inside of the branch as at that point, {{issue}} refers to the branched-to issue: the epic.

Unfortunately it does the same thing for both the options. Existing story points changes to 0 .

And no errors in the Audit log - status=success, just like before.

I have tried so many variation but this automation cant seem to work.

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.
Jul 21, 2023

Are you using a company-managed project or a team-managed one?  You may find this information at the bottom-left of the page's expand area.

  • Company-managed projects use the smart value "Story points" but
  • Team-managed use "Story point estimate"...
  • even though they are both called "Story Points" in the UI.

If you need to change your rule, please note the spacing and capitalization; both are important for rules to work correctly.

Hi @Bill Sheboy , this was working for me perfectly for a year, but now seems to work only intermittently. I am unable to get epics to update story point values when child issues change their story points, despite that working just fine historically. Any idea what might have changed?

image.pngimage.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.
Jul 19, 2023

Hi @Stuart Nealis 

Would you please post an image of the audit log details showing the rule execution?  That may provide more clues / context for this.  Thanks!

I know the changes for the epic fields rolled out this year, and so a likely adjustment will be using the parent rather than the epic link field.  Let's see the log first to confirm where the problem is happening.

Kind regards,
Bill

image.png

Hi @Bill Sheboy , Epic link was my suspicion as well, but what is odd is the audit log shows it completed successfully. The story point total does not change, however, and the epic history shows no updates. 

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.
Jul 20, 2023

Let's rule out (no pun intended :^) some things...

Is this a company-managed or team-managed project?  (Remember that team-managed use the "Story point estimate" field rather than the "Story points" field.

If you navigate to that epic, can you see the story points field?

If you manually edit the story points field for the epic, what do you observe happening?

Has the owner of the rule changed recently?

Have the permissions of the Automation for Jira user changed recently?

  • It is a company-managed project
  • story points field is visible on the epic
  • manually editing the field is successful, it stays updated with whatever value you add
  • the rule has not changed owners
  • permissions have not changed for Automation for Jira user.

 

I should point out that I created this automation as a copy of an existing one that triggers off story point value changing on any non-epic issue, I just made this version manual trigger because I noticed a few epics hadn't summed child story points correctly. The original version is running successfully, even this morning, but I am unable to get either version to work on those problem epics. The inconsistency is the issue, as I'm not sure the data are reliable at the epic level now.

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.
Jul 22, 2023 • edited

I wonder if the smart value is not matching in the JQL for some reason... 

Let's try this: immediately after the lookup issues action (and before the branch), please write the following to the audit log and observe what you see:

lower case epic link: {{triggerIssue.epic link}};
mixed case epic link: {{triggerIssue.Epic link}};
upper case epic link: {{triggerIssue.Epic Link}};
parent key of trigger: {{triggerIssue.parent.key}};
lookup count: {{lookupIssues.size|0}};
story points sum: {{lookupIssues.Story points.sum|0}};

Interesting, it seemed to work this time when triggered, as it did sum story points to the epic, however it didn't arrive at the correct total (should have been higher than 25)image.png

@Bill Sheboy, thanks for your solution. It worked for me. I need to track only the story points delivered within an epic and set this in another custom field to report project costs. I tried many ways to sum up story points for the issues with "status = Done", but I didn't succeed in any attempt I made. Can you help me out, please?

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.
May 10, 2023

Hi @Reysla Chiaradia -- Welcome to the Atlassian Community!

First thing, are you using Jira Cloud or Jira Server/Data Center?  That will impact which rule features are available for you.  Let's assume you are using Jira Cloud for the moment, and that you are using the Lookup Issues action to gather the child issues of the epic...

You could either modify the JQL for the lookup to include your done status (as you described), or you could use math functions and smart value, list filtering.

If you have tried both of those and they did not work, please post images of your complete rule and the audit log details.  Those will provide context for the community to help.  Thanks!

Kind regards,
Bill

David Peles
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Aug 16, 2023

Hi @Bill Sheboy , thanks for all the support and help bringing reliable value to the community .

looks that I need some assistance with what I understand to be. your solution. (I am quite new with Smart Values) 

I am trying to get the Epic's childrens (stories) story points to their Epic.

what i am doing wrong ??

 

Screenshot 2023-08-16 at 16.10.28.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.
Aug 16, 2023

Hi @David Peles -- Welcome to the Atlassian Community!

In the JQL for your Lookup Issues, you are comparing the "Epic Link" to a name, rather than the key.  Please try substituting to compare to {{issue.key}}

And, please note you have a stray quotation mark in that JQL...but that should be unnecessary if you make the change I suggested.

Kind regards,
Bill

Unfortunately, this is not working for me and I cannot work out why. The story gets updated with story points and the rule triggers, it successfully looks up the other stories in the Epic and the rule appears to update the epic (PMP1-17). For some reason, the story points on the epic is not being updated. Your guidance would be appreciated. It is a company managed project

 

Screenshot 2022-09-16 173555.pngScreenshot 2022-09-16 173521.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.
Sep 16, 2022 • edited

Hi @Ron McFarlane 

Smart values are name, spacing, and case-sensitive.  Please try this instead for your edit:

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

When in doubt for what to use for a smart value, please take a look at this how-to article.  It shows how to load an issue and see all possible smart values.

https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

Also note I stuck a default value of zero on the expression.  This will handle the case of all of the story points being empty (null).

Kind regards,
Bill

Hi,

 

I try to do this on my Jira.

But I get no values for story point in my EPIC ( Well I get 0 )

Both Story have values for Story point

 

Change value is "{{lookupIssues.Story points.sum|0}}"

 

What do I miss ?

 

//Henrik 

 

jira2.PNGjira1.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.
Apr 16, 2023

Hi @Henrik Ekenberg -- Welcome to the Atlassian Community!

To use the {{lookupIssues}} smart value you must first use the Lookup Issues action to populate the results.  Please look earlier in this thread, or at the documentation, for how to do that.

Kind regards,
Bill

Hi,

 

Before post last message tested this but without success.

Maybe wrong way get lookupIssues ?

 

//H

 

jira3.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.
Apr 17, 2023

Hi @Henrik Ekenberg 

Are you using Jira Cloud or Jira Server/Data Center version?  My understanding is the Lookup Issues Action is only supported by Jira Cloud currently.

Thanks!

Hi,

 

I use Server / Data Center version.

So no work around ?

 

//H

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.
Apr 17, 2023

For the Server/Data Center version of rules, there is a bulk-handling option to treat the results of a branch or scheduled trigger as a set, and this enables the {{issues}} smart value.  Note this one is plural, and it is the equivalent of Lookup Issues for Cloud...although it is a bit less flexible.  Perhaps try that to see if it helps.

Screen Shot 2022-06-08 at 9.57.59 PM.png

This is the configuration I came up with for team managed projects. hope it helps someone.

Whats in your Then: Edit Issues fields Advanced section?

Hi, it seems lookupIssues option is not avaiable for Jira Server. Any WA to make it work on Jira Server version?

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.
Mar 17, 2022

Hi @Fernando Cirino Sato -- Welcome to the Atlassian Community!

For Server/Data Center version, please take a look at bulk-handling option for branches and scheduled triggers.  That allows you to use the {{issues}} smart value to treat them as a set.

https://confluence.atlassian.com/automation/bulk-handling-of-issues-993924653.html

Kind regards,
Bill

Like Fernando Cirino Sato likes this

I have moved away from this, removing epic story points sum up.

 

Why?

 

I have moved to using Jira advanced roadmaps and let the roll up happen naturally.

 

If we move engineering to tasks under stories then I would have to use the original answer which is to sum up tasks to stories. 

Like Bill Sheboy likes this

Has anyone been able to make this work for Jira Server or Jira Data Center?  Seems easy for Jira Cloud.  After pouring through all the posted links for additional information, I can't seem to make this work.  The best I can do is get the Summed Story points to show 0 on the Epic, which means it doesn't work.

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.
Aug 28, 2023

Hi @Maria DePasquale 

I appears Lookup Issues for the server/data center version has been completed and is "Waiting for Release".  Please look here to follow progress: https://jira.atlassian.com/browse/JIRAAUTOSERVER-53

Once that feature is available this scenario will be easier.  At this time, I believe the work-around needed to update the epic is to call the REST API with a JQL search, as this will produce a list of issues from which the child-issue fields can be summed.

Kind regards,
Bill

Thanks @Bill Sheboy but I'm not quite sure how to call the REST API.  I was hoping someone had a concrete example, like everyone has for the Cloud version, to help me figure this out.   I can't seem to get the right JQL and possibly, I don't have it in the right location in the Automation anyway.  Also, we just upgraded Jira so if anything new is coming out, I won't see it anytime soon.

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.
Aug 28, 2023

This how-to walks through calling a REST API function, and I suspect it will help for Jira Server / Data Center also.

The JQL you need would be to find any issues having the Epic Link for the epic you want.

And a couple of possible REST API functions to call would be:

get issues for epic: https://docs.atlassian.com/jira-software/REST/9.10.0/#agile/1.0/epic-getIssuesForEpic

search for issues with JQL: https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#searching-for-issues-examples

Thanks @Bill Sheboy, I have this working.  It takes three Automations.  

Rule 1: Set up Triggers
This is the first automation rule that will get triggered whenever there is a change to “Story Points” field in any tickets. It is mainly used to set up the properties that will be used to

WHEN
- Field value changed: Story Points
ISSUE FIELDS CONDITION
- Field: Issue Type
- Condition: is not one of
- Value: Epic, Spike
SET ENTITY PROPERTY (this is used as an indicator in rule #2 that this is the triggering issue amongst all other task in the Epic)
- Entity Type: Issue
- Property Key: epicSumTrigger
- Property Value: true (note: the actual value does not matter i.e. you may set any other values, but it has to match the validation in one of the step in rule #2)
BRANCH RULE / RELATED ISSUES (this is used to trigger rule #2 such that we can use another branch rule to find all tasks of the Epic to get the summation of the story points)
- Type of Related Issues: Epic (parent)
- Process all issues produced by this trigger in bulk: ☑️
- then, SET ENTITY PROPERTY
— Entity Type: Issue
— Property Key: updateStoryPoint
— Property Value: true (note: the value does not matter, it used to trigger rule #2 and we do not validate the value)

Rule 2: Summation of Story Points
This will get triggered from rule #1. We need this intermediary step because we are unable to set the story point of the Epic directly after we do the summation using branch rule — Stories (or other issues in Epic).

Rule Details

* ☑️ 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.

WHEN
- Issue Property Updated: updateStoryPoint
ISSUE FIELDS CONDITION
- Field: Issue Type
- Condition: Equals
- Value: Epic
BRANCH RULE / RELATED ISSUES
- Type of Related Issues: Stories (or other issues in Epic)
- Process all issues produced by this trigger in bulk: ☑️
- (we only need 1 of the task to get updated and trigger rule #3. but since all the tasks in Epic will get affected due to this branch rule, rule #3 will get triggered multiple times [resetting the Epic story point of the same value over and over again] whenever the property is set to each of the tasks in the Epic, we have to split into 2 steps:
— a. Set the summation to a temporary property of all the tasks
— b. If “this” issue is the original triggering issue, then set the summation to a property that will trigger rule #3)
- then, 1. SET ENTITY PROPERTY (step a)
— Entity Type: Issue
— Property Key: epicSPTemp
— Property Value: {{issues.Story Points.sum}}
- 2. ADVANCED COMPARE CONDITION (step b.1)
— First Value: {{issue.properties.epicSumTrigger}}
— Condition: Equals
— Second Value: true (this matches what we set in rule #1)

- 3. SET ENTITY PROPERTY (step b.2)
— Entity Type: Issue
— Property Key: epicSP
— Property Value: {{issue.properties.epicSPTemp}}
Rule 3: Set the summation to Epic
This is the final rule used to set the Epic’s story point field using a property in original triggering issue.

Rule Details

* ☑️ 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.

WHEN
- Issue Property Updated: epicSP
ISSUE FIELDS CONDITION
- Field: Issue Type
- Condition: is not one of
- Value: Epic, Spike
BRANCH RULE / RELATED ISSUES
- Type of Related Issues: Epic (Parent)
- Process all issues produced by this trigger in bulk: ☑️
- then, EDIT ISSUE
— Story Points: {{triggerIssue.properties.epicSP}}
SET ENTITY PROPERTY (to reset the property so that rule #2 will not get affected in the next occurrence)
- Entity Type: Issue
- Property Key: epicSumTrigger
- Property Value: false

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.
Aug 28, 2023

Thanks for that information!  I have seen that solution pattern before for some edge cases in Jira Cloud, although...

That last trigger does not exist for Jira Cloud automation...but then again, the Lookup Issues route is easier for cloud  :^)

Can anybody help me to get the automation rules for summing Story Point estimates of Story issues under particular EPICs under a Team-based project, where Story Point estimate is available instead of Story Point?

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.
Sep 16, 2023

Hi @Shabbir Anower 

Company-managed projects use the "Story points" field and Team-managed projects use the "Story point estimate" field...even though both are called "Story Points" in the UX.

In your rule, please try changing to use:

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

I added handling for a default value of 0 when there are no sizes for the stories.

Kind regards,
Bill

Hi Bill,

Showing success, but not  summing up in Epic. Details in the attachment.automation rules.jpgoutcome.jpg

My problem for summing up from Stories to Epis is solved, when I used JQL for particular project and Epic key (Test-1).

But when changes in sub-task, it's not updated in Epic Story Points

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

As noted earlier: team-managed projects use the Story point estimate field and not the Story points field, even though in the UX for issue views it is displayed as "Story Points".

The edit issue action in the rule cannot use the drop-down to select the Story Points field as that will change the wrong field.  Instead the rule must use the advanced edit with JSON, like this:

{
"fields": {
"Story point estimate: {{lookupIssues.Story point estimate.sum|0}}
}
}

Thanks Bill.

Is there any way forward for summing Story Points for sub-tasks along stories under a particular EPIC?

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.
Sep 24, 2023

Although it would be possible to build rules to do this...

Sub-tasks normally do not have story points, as story points help with items (stories/tasks) built and released to production while sub-tasks are pieces of work that  contribute to completing a story/task, and are not released to production.

What problem are you trying to solve?

@Bill Sheboy Hello Bill - Firstly, yeomen's work here helping the needy community.  It is so very much appreciated!!! 

I have a similar question as Shabbir but slightly different.  We use a "Task" issue type vs "Sub-Task" so that we can move "tasks" between sprints if needed given the way subtasks are married to their parent ticket.  As a result, we're trying to rollup Task story points to Stories.

I've read enough of your responses to say I am in a company managed project.  My edit formula reads: {{issue.Task.Story points.sum}}.

The automation is showing as it was updated successfully; however, no changes are present in the field.  Any guidance is appreciated!

One interesting observation - I did try adding the |0 to the end and it did actually update to zero.  When I remove the |0 it empties the field.  So it is reaching this field; however, it doesn't seem to take on the values I input into the task.

Rule.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.
Sep 26, 2023

Hi @Joseph Meldrum -- Welcome to the Atlassian Community!

First thing, I recommend creating a new question and linking back to these older threads.  Otherwise only the people following them will see your question, limiting the amount of ideas you get.  

Next, your rule is missing a Lookup Issues action.  Using JQL, that would gather the relevant issues and then allow using the sum function. 

And then you will want to be careful to branch to only the linked user story you want to update.  That will make your rule faster and reduce the chance of errors.

Kind regards,
Bill

@Bill Sheboy Thanks Bill!  Yes I'm a newbie to the community, so I will be sure to do that moving forward.  This thread is quite long, so understand.

I need a little help though with the Lookup - firstly, where in the rule structure does the Lookup action need to exist based on what I have currently defined?  Secondly, can you help me with the syntax?  Would I need to change the final syntax as well ({{issue.Task.Story points.sum}})?

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.
Sep 26, 2023 • edited

Before you proceed, given what you described please consider if instead your "stories" should be Epics and the "tasks" can be linked as children of the Epic.  That will greatly simplify what you are trying to do as it can use built-in features of Jira.

 

I gave a link to the documentation for Lookup Issues, and I encourage both reading that and experimenting a bit.  Both are needed to be successful using rules.  And also, learning about creating JQL statements, when needed for rules.

As for changes to your rule, here's an outline of the changes (in italics).  Please review your current situation to confirm the link types for the JQL statements.

  • trigger: value changes for Story Points
  • condition: issue type equals Task
  • action: lookup issues with JQL, to find the Story first
    • project = yourProjectName AND issueType = Story AND issue IN linkedIssues({{triggerIssue.key}}, "Related To")
  • advanced compare condition: to confirm there is only one Story linked
    • first value: {{lookupIssues.size|0}}
    • condition: equals
    • second value: 1
  • action: create variable, to save the Story's key for later
    • name: varStoryKey
    • value: {{lookupIssues.first.key}}
  • action: lookup issues with JQL, to find the sibling Tasks
    • project = yourProjectName AND issueType = Task AND issue IN linkedIssues({{varStoryKey}}, "Related To")
  • branch on JQL: key = {{varStoryKey}}
    • action: edit to set the story points field of the "parent"
      • {{lookupIssues.Story points.sum|0}}

@Bill Sheboy Thanks so much for the guidance!  Yes, I know we're running this a bit unorthodox here - we are using EPICs but I would say we're using them at an "intiative" level with Stories acting as a "layer" in between the tasks and epics.  I'd change it if I could...I disgress.

I tried to mirror what you've recommended and have worked through a few syntax issues...for example, it gave me and error using the '(' around the linkedIssues so I modified that to say issue in linkedIssues({{triggerIssue.key}}, "Related To")

Now I seem to be encountering a different issue where the second lookup isn't consuming the created variable.  In the error, its not showing the present of the {{varStoryKey}}

 

rolluperror.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.
Sep 26, 2023

Thanks for finding my error; I corrected the earlier post.

That seems to indicate the created variable is empty, or is interpreted as empty.  Let's confirm both:

First, please add a write to the audit log after the variable is created to check:

the saved story key is: {{varStoryKey}}

Then, let's change that second lookup issues JQL to this:

project = yourProjectName
AND issueType = Task
AND issue IN linkedIssues("{{varStoryKey}}", "Related To")

Hey @Bill Sheboy it turns out I had a typo with {{lookupIssues.first.key}} - I did not have the "." between first and key.  I was also missing the key={{varStoryKey}} in the branch.  After those fixes it works as expected.

Thanks again!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events