Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JMWE add-on Conditional execution not working

Almu October 6, 2021

Hi guys,

Jira Data Center, JMWE 6.2.4, JMCF 2.1.6

Ive got a Calculated (scripted) Number Field by JMCF -> Condition1

and I use it in the JMWE postfunction for Conditional execution:

Only if condition is true

linkedIssue.get("Condition1") > 0

 

Although the condition is true (Test Groovy), the Transition Related Issues Post-function does not run. It works without conditional execution.

If the condition is true , why it does not run???

Is this a bug?

Thanks a lot for your help.

 

1 answer

1 accepted

0 votes
Answer accepted
David Fischer
Community Champion
October 6, 2021

Hi @Almu ,

it really depends on the "formula" of the Calculated (scripted) Number Field - it might not return the expected value when evaluated during the transition. You should add logging in your calculated field to log the returned value.

Almu October 6, 2021

Hi David,

Thanks for your swift answer.

The calculated field returns:

Result type:
Integer
Result value:
1

That is why the JMWE postfunction for Conditional execution:

linkedIssue.get("Condition1") > 0

returns true.

So, any idea, please?

Thx a lot!

David Fischer
Community Champion
October 6, 2021

Do you mean that the formula is:

return 1

If not, can you try modifying the formula to just that, just to test whether that works? 

Almu October 7, 2021

Hi David,

Sorry for the delay.

The problem was in the calculated field code. Although it showed:

Result type:
Integer
Result value:
1

It was not really integer 1. So I used a condition and put return 1, and it works.

Thanks a lot for your help!

Suggest an answer

Log in or Sign up to answer