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(s). If a field contains users, the validator checks if the current user is selected. If the field contains groups, the validator checks if the current user is within any of those selected groups.
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 in 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.
Supported fields
The following fields are supported:
- Custom fields - user picker, multi-user picker, group picker, multi-group picker.
- System fields - reporter, assignee, watcher, request participants.
Use this validator
- Go to Administration > Issues > Workflows.
- Select Edit on the workflow you want to add this validator to.
- Select the transition to which you wish to add this validator to.
- Under Options, select Validators.
- On the Transition page, select Add validator.
- Select User in field(s) validator.
- Optional: Enter a note that describes the validator (this note is for your reference when viewing all validators).
Select 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.
If your transition includes a screen, make sure your selected fields are on the transition screen this validator applies to. This validator will check field values even if they are not on the screen.
Optional: Select Invert.
For Jira servers and projects which allow anonymous users to view and transition issues:
- If the validator is not inverted, anonymous users are always blocked from transitioning the issue.
- If the validator is inverted, anonymous users are allowed to transition the issues.
- Enter an Error message to display if the user is/is not in the chosen field(s).Select Update.
Select Publish and choose if you want to save a backup copy of the workflow.