I want to calculate the value created in the lookup table in the JQL condition of if.
I would like to make the if condition calculated as follows, but is it not possible to calculate with the if JQL table?
{{#=}} {{done.get("A")}} - {{open.get("A")}} {{/}} > -1 and {{done.get("A")}} > 0
Your expression is both incorrectly using conditional logic and trying to combine that with a math expression in a way the rule cannot process.
Instead try using the inline version of those operations. (I am assuming your lookup table values are text, and so have added asNumber for conversions.)
{{#if(and(done.get("A").asNumber.minus(open.get("A").asNumber).gt(-1), done.get("A").asNumber.gt(0)))}}do something{{/}}
As a tip...try building up logic like this piece by piece, writing the results to the audit log. That will help confirm the expression works as you expect.
Kind regards,
Bill
Thank you for your answers and it is very helpful
When using custom fields, is it okay to describe it as follows?
Also, can the following description be used in the JQL conditions of the image?
{{#if(and(issue.customfield_10240.minus(issue.customfield_10240).gt(-1), issue.customfield_10240.asNumber.gt(0)))}}do something{{/}}
Don't worry about the language Japan of the image because it doesn't matter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the type of your field customfield_10240: text, numeric, etc.?
That will impact the expression, such as if the asNumber conversion is needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case, you may remove the asNumber conversions.
Next, I notice you are trying to use that expression in a JQL action. That will not work as it is not valid JQL. What are you trying to test?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want to refer to up to 18 numeric custom fields and conditionally determine the value of another field.
I want to do it 9 times
If you set them one by one, the maximum number of components per rule will exceed 65, so I want to describe them in one JQL.
Is it possible to describe the following in JQL?
(customfield_10240 - customfield_10241 > -1 and customfield_10241 = 0)
and ((customfield_10242 - customfield_10243 != 0) or (customfield_10242 =0 ))
and ((customfield_10244 - customfield_10245 != 0) or (customfield_10244 =0 ))
and ((customfield_10245 - customfield_10246 != 0) or (customfield_10245 =0 ))
...
..
.
Put statusA in issueA in the case of
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, wow; that is a lot of fields to use in one decision, making me wonder about your use case.
Would you please describe the problem you are trying to solve? And, describe an outline of the rule you are trying to do this?
Until we see those...
Please review the documentation link I provided for conditional logic. You will want to use an advanced compare condition, and not a JQL condition, to test this.
I respectfully suggest breaking this expression up into pieces, storing them in created variables, and then combining them in the advanced compare condition. That will make testing and maintenance much easier. And, you would be able to do this in significantly fewer rule steps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are trying to do the following
I would like to determine the values of the fields "Z1" and "Z2" based on the values of the following fields: "A1," "A2," "B1," "B2," "C1," "C2," "D1," "D2," ... "I1," "I2."and "Z1," "Z2,"
Since everything is performed in order with "if:lssue Type is one of", automation ends as soon as the values of "Z1" and "Z2" are entered.
1.When "A1" is greater than 0 and "A2" is less than "A1," place 10*A2/A1 into "Z1" and "AAA" into "Z2."
2.When "A1" is greater than 0, and "A1" is equal to "A2," and "B1" is equal to "B2," and "B2" is equal to 0, and "C1" is equal to "C2," and "C2" is equal to 0, ...... "I1" is equal to "I2," and "I2" is equal to 0, then put 10 into "Z1" and "AAA" into "Z2."
3.When "B1" is greater than 0, and "B2" is less than "B1," and "B2" is greater than 0, then place 10*B2/B1+10 into "Z1" and "AAA" into "Z2."
4.When "B1" is greater than 0, and "B2" is equal to "B1," and "C1" is 0, and "D1" is 0, and..... "I1" is 0, then place 10*B2/B1+10 into "Z1" and "BBB" into "Z2."
5.When "C1" is greater than 0, and "C2" is less than "C1," and "C2" is greater than 0, then place 10*B2/B1+20 into "Z1" and "BBB" into "Z2."
6.When "C1" is greater than 0, and "C2" is equal to "C1," and "D1" is 0, and "E1" is 0, and ......."I1" is 0, then put 30 into "Z1" and "CCC" into "Z2."
...
18.When "I1" is greater than 0, and "I2" is less than "I1," place 10*I2/B1+80 into "Z1" and "HHH" into "Z2."
19.When "I1" is greater than 0, and "I2" is equal to "I1," then put 90 into "Z1" and "III" into "Z2."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am still unclear what problem this is solving, and I suspect this will be a brittle solution to implement in an automation rule...primarily due to the difficulty to maintain it.
Regardless, I continue with my earlier recommendation:
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.