we have a Project with Tasks and Subtasks. The time logging is only done in the Subtasks. The WorkRatio is automatically calculated by JIRA for the Subtasks.
But it is not working for the Tasks (with the sums: E-original Estimate).
So i used the addon "JIRA Misc Custom Fields" with a "Calculated Number Field".
My sum calculation works, but I found that it creates a lot of Errors in the logfile.
<!-- @@Formula: (issue.get("aggregatetimespent") != null ? issue.get("aggregatetimespent") : 0) *100 / (issue.get("aggregatetimeoriginalestimate") != null ? issue.get("aggregatetimeoriginalestimate") : 0) -->
I used the "(issue.get("customfield_10114") != null ? issue.get("customfield_10114") : 0)" from https://innovalog.atlassian.net/wiki/spaces/JMCF/overview#JIRAMiscCustomFields-calculatednumberfield
I am not sure, but I think it sorts out empty or 0 values.
Error in logfiles:
Target exception: java.lang.ArithmeticException
Navigate to the following URL to edit the formula: http://...:8080/secure/admin/EditCustomField!default.jspa?id=11107
2017-10-11 09:28:48,628 http-nio-8080-exec-13 ERROR zeppbot 568x194632x1 mufley 10.154.3.62 /rest/cb-automation/latest/project/GLOBAL/rule/29/execute [c.i.jmcf.fields.CalculatedNumberField] CalculatedNumberField: error evaluating formula of field "KPI" of issue TEST-309:
Sourced file: inline evaluation of: `` (issue.get("aggregatetimespent") != null ? issue.get("aggregatetimespent") : 0) . . . '' : Arithemetic Exception in binary op : at Line: 1 : in file: inline evaluation of: `` (issue.get("aggregatetimespent") != null ? issue.get("aggregatetimespent") : 0) . . . '' : ;
Is there soms built-in JIRA field for this one that I can use instead of the calculated field?
What is wrong in my Formula?
The sum up data are the jira fields:
They are calculated by jira.
The jira workratio is calculated with timespent and originalesimate, not with the "aggreagte" ones.
I edited my script a bit because it only set null to 0. I forgot that I also had some 0 as values, which I must exclude because Division by 0 is not allowed.
I think that these were my Errors in the logfile.
It works for me now.
Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot