Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How hide workflow transition base on component selection?

I'm trying to hide workflow transitions base on component selection. I created Behaviour script and getting errors. How I can declare a workflow transition? How I can accomplish this?


import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.workflow.TransitionOptions
import com.atlassian.jira.bc.project.component.ProjectComponent
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours

def action = workflowManager.getActionsByName("Done")
def approved = workflowManager.getActionsByName("In Progress")
def components = getFieldById(getFieldChanged()).value as List<ProjectComponent>
if(components.any{ == 'Sales'}){
if(components.any{ == 'Support'}){


Thank you

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Daniel Ebers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 21, 2020

Hi Shah,

while I cannot help with the code itself I'd like to confirm we did something like this in the past using a simple scripted validator:

On the contrary to what you wrote we did not use a Behaviour, though.
We also not aimed towards hiding the transition (condition) but show a error message to the user (validator).

Probably this would be an alternative for you? If so, the above linked documentation should help you to get an idea.


AUG Leaders

Atlassian Community Events