Should work "Fast-track transition an issue" if conditions
1) not role Developers
2) The transition occurs only from a transaction (Waiting For Customer Reply)
my code:
import com.atlassian.jira.component.ComponentAccessor
!isUserMemberOfRole('Developers')
def workflow = ComponentAccessor.getWorkflowManager().getWorkflow(issue)
def wfd = workflow.getDescriptor()
def actionName = wfd.getAction(transientVars["actionId"]).getName()
// id transit/ (751)
if (actionName == "Waiting For Customer Reply"){
return true
}
Try it like this:
import com.atlassian.jira.component.ComponentAccessor
def isDeveloper = isUserMemberOfRole('Developers')
if(isDeveloper) return false //stop the condition check immediately
def workflow = ComponentAccessor.workflowManager.getWorkflow(issue)
def actionName = workflow.descriptor.getAction(transientVars["actionId"]).name
// id transit/ (751)
actionName == "Waiting For Customer Reply" //no need for if block, just return the result of this comparison
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.