Hi,
I've installed the 'JIRA Misc Custom Fields' plugin on my instance and trying to use the Calculated Number Field option. I've create a custom field for the result. I want that field to display the result (multiplication) of two other custom field, so I tried something like that but :
<!-- @@Formula: (issue.get("customfield_10236") != null ? issue.get("customfield_10236") : 0) * issue.get("customfield_10237") != null ? issue.get("customfield_10237") : 0) -->
but it dosen't seems to return any result... Can someone help me to acheive that or tell me what's wrong with my code, i'm a beginner :P
thanks in advance!
Hi Natalie,
Sorry to dig up long answered question.
I have installed the latest version of JIRA Misc Custom Fields Plugin for JIRA 6.2.5 Version.
I have created Calculated Number Field Type Custom Field and placed the following code in description:
<!-- @@Formula: (issue.get("customfield_123") != null ? issue.get("customfield_123") : 0) * (issue.get("customfield_234") != null ? issue.get("customfield_234") : 0) * (issue.get("customfield_345") != null ? issue.get("customfield_345") : 0) -->
Value displayed : Field is hidden for some reason.
When I update the either of the customfields mentioned above the calculated number field does not show up on the screen.
But when I use the below formula the calculated number field is displayed on the screen but the value is wrong
<!-- @@Formula: (issue.get("customfield_123") != null ? issue.get("customfield_123") : 0) + (issue.get("customfield_234") != null ? issue.get("customfield_234") : 0) + (issue.get("customfield_345") != null ? issue.get("customfield_345") : 0) -->
Value entered :
CF 123: 90
CF 234: 90
CF 345: 90
Value displayed : 909,090
Please let me know what I am doing wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One more question. Using JIRA Misc Custom Fields Is there a formula in the JIRA Calculated field that allows multipliction of 3 fields?
<!-- @@Formula: (issue.get("customfield_10236") != null ? issue.get("customfield_10236") : 0) * (issue.get("customfield_10237") != null ? issue.get("customfield_10237") : 0) -->
Can we add a third field? If so what would be the code? Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Should be:
<!-- @@Formula: (issue.get("customfield_1") != null ? issue.get("customfield_1") : 0) * (issue.get("customfield_2") != null ? issue.get("customfield_2") : 0) * (issue.get("customfield_3") != null ? issue.get("customfield_3") : 0) -->
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just casually looking at this, I can see you have 5 x ('s and 6 x )'s, therefore you have one too many (or too little) brackets in that code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Steve is correct, here's the fixed line:
<!-- @@Formula: (issue.get("customfield_10236") != null ? issue.get("customfield_10236") : 0) * (issue.get("customfield_10237") != null ? issue.get("customfield_10237") : 0) -->
:)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Helped me in 2018! Thanks!
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.