I am trying use a JIRA Workflow Toolbox field type of Calculated Number where I'm multiplying the values selected from fields having radio buttons (values 1-5 and None). I'm using the following string format expression which passes the syntax check:
toNumber("%{15703}")*toNumber("%{13608}")
However, even though there are entries in the fields of the expression on the issue, the calculated field doesn't display with the product.
I tried doing a simple numerical equation (1+2) and that worked so I know I'm missing something, I just don't know what it is. Any help would be greatly appreciated.
have you tried the expression without the quotation marks?
If you're experimenting with parser expressions and run JWT 2.4.0 or newer, I'd clearly recommend testing your expressions on the newly added Parser Test Page (see the documentation here: https://apps.decadis.net/display/JWT/Expression+Parser+Test).
You can evaluate your expressions and only deploy the one's to your custom fields that are working as expected.
Cheers,
Thorsten
Removing the quotes worked! Thanks.
It's not a big deal but is there any way to make it so that if a user selects "None" (blank entry) in one of the calculated fields, that the return would treat it as a 0?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please try the following expression:
(%{15703} != null AND %{13608} != null) ? (toNumber(%{15703})*toNumber(%{13608})) : 0
It returns your requested calculation if both fields are set and 0 otherwise.
Please let me know if that solves your problem.
Cheers,
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That does solve my problem. Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I created a Days to Complete calculated field using the example from the JWT documentation:
{Date and time of resolution} !=null ? {Date and time of resolution} - {Date and time of creation} : null
My display format is Duration with short format.
My question is, how can I search for issues that took longer than "X" # of days? I can access the field in the filter dropdowns and in the advanced filter feature but it doesn't like any entry I put in.
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.