fast track transition issue based on user picker field

I'm trying to fast track a transition an issue based on a user picker having a value or not.

If the user picker is populated I want the transition to fire. If it's empty I don't.

Without any example for referencing a user picker I had a few guesses but no matter what I tried the transition would never occur. There was nothing in the logs so as far as I can tell there is no actual error.


What is the correct syntax for determining if a user picker has a value?


3 answers

1 accepted

0 votes
Answer accepted

You can also do it using "Set field as a function of other fields" post-function of JIRA Workflow Toolbox plugin as I show in the screenshot:

Captura de pantalla 2016-02-12 a las 12.51.44.png

In this case transition "Assign Issue" will be executed if custom field "User Picker" hasn't a value, and transition "Start Progress" if the field is set.

Note that ^$ is regular expression for empty string, and .* is regular expression for a non-empty string.

  1. Get object for custom field like that:

    CustomField cstFld_getTime = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("customFieldName")
  2. Get value for sertain issue and check for null

    if(issue.getCustomFieldValue(cstFld) == null){
    //	actions if null
    	//actions if not null



Are you saying that I cannot use the script post function to do it and can only do it in a groovy script? If that's the case then I'm going to have to learn how to transition an issue in groovy.

You can use Script postFunction provided ScriptRunner plugin

Yes but I would like to use "Fast-track transition an issue" which really isn't compatible with what you've posted.

What you've posted is more suited to  "Custom script post-function" which i'm hoping to avoid as I need to learn a whole lot more than just how to access a custom user picker.

Also i'm not sold on what you've posted working for a user picker anyway seeing as it's not just a simple field but an object.


I figured it out after looking through the source code for script runner and doing some tests in script console.

The null conditions are as simple as

cfValues['User Picker'] == null // to check for empty
cfValues['User Picker'] != null // to check for populated


also cfValues['User Picker']?.toString() resolves to "TestUser(testuser)" (for a user called testuser) when populated and "null" when not populated.

With this syntax it could be used to check for a specific user.


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

372 views 6 0
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