Hi there,
I am really stuck so I hope you can help me.
My case should be simple :
To achieve this, I have tried, in the WF, to use the ScriptRunner Script option of the transition conditions but I didn't succeded in having it correct.
What is the best way to make this comparison?
Thanks in advance,
Enjoy :-)
Mathieu
Hi @Mathieu Roos ,
I guess there might be multiple solutions to your case, but here is what I would do: Create two different transitions, one for getting to the "approval" state and one for "resolved".
You will then need to add a condition on each transition, so that only the correct transition is shown. In your example (with the multi-select field) you'll want to use an expression like this one to check if an option is or is not part of the selected items.
Let's say your field id is 12345 and you want to check if "b" is selected, you would use this expression on the "approval" transition:
issue.customfield_12345.filter(f => f.value == "b").length != 0
The next step is just as easy, simple negate the previous expression and put it onto the "resolved" transition:
!(issue.customfield_12345.filter(f => f.value == "b").length != 0)
And that's it.
Hope that helps,
Oliver
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.