Hi,
I have a status that has 2 transitions (Peer Review and independence Review. I created a condition based on Overall Impact field (single select). If Overall Impact is High, Independent Review should show and Peer Review should be hidden.
If Overall Impact is either Low or Moderate, Peer Review should show and Independence Review should be hidden.
Selecting Low or Moderate works (Independent Review is hidden) BUT if I select High, Peer Review still shows (transition should be hidden).
Here's my condition for Peer Review
The condition may not run if an earlier condition in a group already made a determination (the first one failed in an AND group, or the first one passed in an OR group).
For readability, I'd rewrite your condition like this:
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.customFieldManager
def impactCf = customFieldManager.getCustomFieldObject(30924)
def impactValue = issue.getCustomFieldValue(impactCf)?.value
def showTransition = impactValue in ['Low', 'Moderate']
log.info "impactValue is $impactValue resulting in showTransition=$showTransition"
return showTransition
And
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.customFieldManager
def impactCf = customFieldManager.getCustomFieldObject(30924)
def impactValue = issue.getCustomFieldValue(impactCf)?.value
def showTransition = impactValue in ['High']
log.info "impactValue is $impactValue resulting in showTransition=$showTransition"
return showTransition
Also, with the log statement, you'll see exactly what the script tried to return.
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.