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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,197 views 13 19
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot