JWT Calculated Number field not appearing on screen

MEDITECH ADMIN TEAM January 24, 2019

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. 

1 answer

1 accepted

1 vote
Answer accepted
Thorsten Letschert _Decadis AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 25, 2019

Hi @MEDITECH ADMIN TEAM,

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

MEDITECH ADMIN TEAM January 29, 2019

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?

Thorsten Letschert _Decadis AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 30, 2019

Hi @MEDITECH ADMIN TEAM,

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

Like arige hamdan likes this
MEDITECH ADMIN TEAM January 31, 2019

That does solve mproblem. Thank you very much!

MEDITECH ADMIN TEAM February 6, 2019

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.

Suggest an answer

Log in or Sign up to answer