Show transition if current user is in same group as group picker field Edited

I would like to show a transition on an issue only if the current user belongs to the group selected in the group picker field on that issue. 

For example, the group picker on the current issue is set to "Group A." If the current user belongs to the group called Group A, show the transition. If the current user is not in the group, hide the transition. The group picker may be set to Group A, Group B, Group C, etc. so it cannot be a static string in the condition. 

I have not used Groovy scripting yet, but DO have Script Runner installed. Just not sure how to write anything in Groovy.

In short terms, I need to show my 'Assign To Me' transition on an issue if the current user is in the same group as the group picker value.

1 answer

1 accepted

1 vote

You don't need scriptrunner to be able to do this in JIRA.   All you need to do is edit the workflow, select the transition in question, and the add a condition called "User is in group custom field":

condi1.png

Once you do this, you then have to select the custom group field in question. In my case my group picker custom field name was GP1:

condi2.png

From that point you just have to publish the workflow.   I was then able to make sure that if my user was in that group, they could see that transition, whereas other users not in that group cannot see this transition.

I have no clue how I wasn't able to figure this out. I have loads of workflow conditions/post functions and for some reason never knew this option was there. Hilarious! Thank you SO much!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you