Hi all,
I'm using a calculated custom field from the Jira Misc Custom Field plugin.
Below is my formula to calculate the percentage difference between 2 budgets:
<!-- @@Formula:
var basecost = issue.get("customfield_12104");
var actualcost = issue.get("customfield_13000");
var difference = actualcost-basecost;
var percentagediff = (difference/actualcost) * 100;
return percentagediff;
-->
As a test, with the base cost being 145000 and actual 157000, the calculation returns 7.643 in the custom field.
Using the default windows desktop calculator and Google Calc, the result is: 8.275.
The field itself is a Calculated Text Field, and the customfield_12404 & 13000 referenced in the code are standard numerical fields.
Any ideas? Appreciate the help!
Hi, Joe.
Via manual calculation, I received similar value for the percentagediff custom field, figure by figure:
basecost = 145000
actualcost = 157000
difference = 157000-145000
= 12000
percentagediff = (12000/157000) * 100
= 0.07643 * 100
= 7.643 %
So, I am not certain why Windows / Google Cal would give a different value here. Have you tried with different values and compare the results?
Hi Ahmad,
The issue was with one of the fields it was pulling through, it didn't seem to have the number in the right format.
I created it again and it all works now!
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there, Joe.
Awesome. Glad to know that we found the root cause to the problem. You are most welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.