User in Field(s) Validator

The User in Field(s) Validator controls if a user can transition an issue based on whether or not they are added in any specified field. If the fields contains users, the validator checks that the user trying to transition an issue is/is not mentioned in a specified field. If the fields contains groups, the validator checks if the current user is within any of those selected groups

The following fields are supported:

  • Custom fields - user picker, multi-user picker, group picker, multi-group picker.
  • System fields - reporter, assignee, watcher, request participants

There are two ways to use this validator, depending on if you choose to invert the validator or not:

  • (Normal) The transition is allowed if the current user is listed in at least one of the specified fields.
  • (Inverted) The transition is allowed if the current user is not listed any of the specified fields.

For example:

  • I have a Hiring Manager custom field on my recruitment project. I want to ensure only the hiring manager can transition the recruitment ticket to Offer Accepted.
  • I have a Team Members multi-user picker field auto-populated with a list of all the users in the reporter's team. I want to restrict these users from transitioning the issue to Escalated.

  1. Select the User in Field(s) Validator [ScriptRunner] validator.

    For details on how to navigate to ScriptRunner workflow functions, see Navigating to Workflow Functions.

  2. Enter a description of the validator in Note.

  3. Enter one or more User Field(s). Only users added in any of these fields are able to transition the issue. If inverted, users added in the specified fields will not be able to transition the issue. 

  4. Optionally, select to Invert.
  5. Add an Error Message to display to the user if the current user is not/is mentioned in a specified field.
  6. Click Update.