Hi,
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.
Calculation:
@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?