I'm using Script Runner to calculate the total estimate, remaining work and total time spent of all issues and subtasks related to an epic.
JQL is working fine
issuefunction in subtasksOf("'Epic Link' = ABC-1") OR "Epic Link" = ABC-1 AND issueFunction in aggregateExpression("Total Estimate for all Issues", "originalEstimate.sum()", "Remaining Estimate for all Issues", "remainingEstimate.sum()", "Total Time spent", "timespent.sum()")
and results in an alert box when executing the search showing all my times.
Problem / Challenge:
I want to create 3 custom fields for all my epics dynamically calculating and showing the times for all issues and subtasks in it.
I'm looking forward to hints & tips! Thanks!
If you are already using ScriptRunner it would as easy as creating a scripted field with the script inside being something based on JQL search:
this will get you the issues.
Once you have the issues it is all about calculating the field you want to display. Something like this:
def resultSum = 0
change getOriginalEstimate() with getEstimate() and getTimeSpent() as needed
also check out Adaptavist documentation on Scripted Fields:
Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events