Hi,
We have a requirement to copy the 8 percent of custom field value to another custom field in a workflow transition. If the value is less than 1, then round off to 1. If the value is greater than 1, take the same value. We have JSU add-on, JWT add-on and Script Runner add-on. Could you please help me .
Thanks in advance.
Hi @VENKATESHWARARAO ,
if I get your use case right, you should be able to use an expression like this with JWT:
{nnnnn} * 0.08 < 1 ? 1 : {nnnnn} * 0.08
nnnnn has to be replaced with the value of your source custom field.
The behavior is: return 1 if multiplying this field with 0.08 (the 8 percent) is lower than 1 and return the result otherwise.
Please let me know if I understood you correctly and this solves your request.
Cheers
Thorsten
P.S. You should obviously go for an update issue fields post function, selecting your target field and then using the numeric parsing mode.
Hi @Thorsten Letschert _Decadis AG_ ,
Thank you for the response. When I am trying to implement above expression, it's not copy the value. Just it copy the entire expression new custom field. Could you please help is there anything I want to do.
Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @VENKATESHWARARAO ,
please make sure, the 'Parsing mode' is set correctly. However, if you're saying that the whole expression is being copied, I assume that you have a text field here.
For a number field, choose Math/Time expression - for a text field, choose Parsed text (advanced mode).
Cheers
Thorsten
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.