Need JIRA script which can sum the story points of the story into the EPIC estimation field

njain2@markem-imaje.com December 14, 2020

Hi Team,

There is a field called "Estimation" in EPIC.

The requirement is to have sum of story points to be calculated and put into "Estimation"

How can I achieve this?

Kindly please help.

 

Regards,

Neeta Jain

2 answers

0 votes
Haddon Fisher
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 14, 2020

I don't think there's anything in "off the shelf" JIRA that would do this for you - theoretically you could write some SQL, but if you're messing around in the database you are probably doing something wrong in any case :)

Either 'Automation' or 'ScriptRunner' would give you the tools you need to accomplish this...I have found the best method to be replacing the epic 'estimation' field with a scriptrunner scripted field which automatically sums up the points from the child tickets.

njain2@markem-imaje.com December 14, 2020

Hi Hadden,

Exactly I wanted to ask you is it achieve through scripted field.

If yes can you help me to achieve this.

I am new to the scripts, so need some initial help from you,

 

Regards,

Neeta Jain

Kim P December 17, 2020

@Haddon Fisher - I am in the same position where I have a custom field on the Epic that will auto sum story estimates.  We can utilize both automation and ScriptRunner as we have access to both and are on Jira Cloud. 

  1. Could you please elaborate more on how to implement via Jira automation?  I have tried but been unsuccessful. 
  2. If there are benefits to using ScriptRunner, am happy to go that route.  Likewise could you provide more guidance on how to implement? 

Truly appreciate your expertise and assistance.

Kind regards,

Kim

Haddon Fisher
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 17, 2020

I just realized this was for Cloud; apologies for missing that flag. I am pretty sure ScriptRunner for Cloud doesn't allow scripted fields, but there may be other plugins out there that would do this summing specifically on Cloud.

Let me build a rule in Automation and post a screenshot - off the top of my head I think it would need to be a 'scheduled' trigger.

Kim P December 18, 2020

@Haddon Fisher - I had initially tried scriptrunner and identified quite immediately that scripted fields won't work in cloud. 

I'm struggling to get the automation to work, even with the many posts in recommendations in the community. I'm not sure if you can easily read this, but am working with this at the moment.Jira - Automation - Epic.png 

Haddon Fisher
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 24, 2020

I have managed to get this working, but only in a pretty hack-y way. I am going to keep testing, but I wanted to get some kind of solution up to see if anyone could think of anything better. 

Rule 1:

Trigger: Scheduled (for my tests I ran this every 4 hours, but you could do it on your own schedule). For my JQL, I looked for all open epics in our dev projects.

Branch: For Stories (or other issues in Epic)

-- Action: 'Edit Issue Fields' Set 'Epic Story Size' equal to {{issues.story size.sum}}

Rule 2:

Trigger: Scheduled (I set this to run every 4 hours, and scheduled so that it would run 30m after rule 1). For JQL, I would look at all children of open epics in our dev projects where 'Epic Story Size' is not empty.

Branch: Epic (Parent)

Action: 'Edit Issue Fields' copy 'Epic Story Size' from 'Trigger Issue'

 

This approach does work, but it's very inefficient and I would guess kind of expensive on Cloud. The main issues I am seeing are:

  1. When editing an issue, you can copy values from but not to other issues.
  2. There is no way to access issues outside of a branch once you are in it i.e. if given a list of epics, I branch to all stories in each epic, I cannot get back to the "trigger" epic.

These two combine to make it necessary to "stash" the summed story points somewhere on the children first. I see that they've implemented the {{issue.subtask.x}} smart value but explicitly say that this doesn't work for epics.

It feels like there's a better way out there, but I haven't been able to see it yet.

Rahul_RVS_Support
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
December 24, 2020

Hi All,

You might also want to try out our add-on to manage multiple Epics and their hierarchy on a single page.

Agile Tools - Epic Tree and Time in Status 

Manage and visualize your Epics with rolled up estimate progress reports.

Key features:

  • Epic Sum
  • Configure progress % calculation on either "remaining estimate" or "original estimates"
  • Epic Tree directly on Issue Screen
  • Display and manage Epics/Issues of your project
  • Edit Issue summary, time estimates, story points and assignee on the tree with real time updates in the progress
  • Rolled up percentage completion and at issue level as well
  • JQL support for Epic Hierarchy screen
  • Time in Status report using JQL
  • Issue Tracker to view complete transitions on your issue screen
    • Status Transition : View all the status changes in a single tab along with average time and count in each status. Switch between graphical and tabular view to make more out of the data.
    • Assignee Transition : View all the assignees for the issue along with the time for which the issue was with each assignee. Switch between graphical and tabular view to make more out of the data.

 

Epic Hierarchy Screen_Cloud_Edit.png

Epic Hierarchy_Issue Screen_Cloud.PNG

Kim P December 28, 2020

This is great, but of course another added fee.  We did not realize this was a current limitation of Jira. Seems Epic sum would be native Jira functionality as most would desire this. 

We need a solution that doesn’t cost more money but appreciate the suggestion.

0 votes
Bernhard Doleschel _Ease Solutions_
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 14, 2020

Hi njain2@markem-imaje.com ,

please have a look at Epic Sum Up App from APTIS. I think they provide as solution you are looking for.

 

Best regards, Bernhard

njain2@markem-imaje.com December 14, 2020

Means it needs a addon, is it not possible using any script?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events