How to prevent transition if certain user is listed in custom user picker field

I have two custom user picker fields, "Defect Owner" and "Assisted" and both default to user "sfederman" when an issue is created. I need to create a rule that prevents users from progressing the ticket if sfederman is still listed in this field. 

3 answers

Create a validator. You can do that with various plugins (mine is JJUPIN, but you can use ScriptRunner, etc).

  1. Install the Scriptrunner plugin, if that's not already done. It's free, and extremely useful for any sort of advanced configurations.
  2. Add a Script Condition (or Script Validator) to your workflow transition(s) out of the initial status, or in any transition you want this rule to apply. A Condition would make the transition unavailable unless the conditions are met, the Validator makes the transition available, but would give an error message when attempting it without the condition being met. Your call.
  3. Several examples are provided. Your own condition would look like cfValues['Assisted']?.value != 'sfederman'

Have fun!

So i scripted this as a validator but it doesn't seem to be working. The issue transitions just as it normally would.

The Scriptrunner documentation may be of a better help. I must admit I haven't used the scripted rules much, and I'm not knowledgeable in Groovy. There might be a simple syntax mistake in what I gave you. I based my suggestion on the examples given.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

78 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