I have a Single Select custom field, the options are only "Yes" and "No", I want to know how to use Script to help me, today I choose "Yes" to see the next Transition, otherwise the Transition will be hidden.
Ps. Custom field in the transition screen
Jira 7.19
Scriptrunner 5.5.6
You can't do this during a transition, because a transition has a fixed endpoint that you cannot change after you've decided to go there. But you can do it before the transition starts, or after it ends.
The two tricks are both workflow based. I'm going to imagine a part of your workflow and try to keep it simple. Let's say you have three status in it - analysis, coding, and ask-question. With your question leads me to a definition of "When the issue is in analysis, if my select list (called "more questions?") is set to yes, go to ask-question, and if no, the next status is coding"
For trick one
Pros and cons
This will skip your issue through ask-quesion straight into coding when the field is "no"
Trick two is probably more intuitive for your users, and won't litter your history with a transition to a status that isn't actually going to be acted on.
Pros and cons
When your users look at an issue in analysis, they will only be offered one of the transitions and it will be the one determined by the current content of the field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.