Field(s) Required Validator
Use the Field(s) required validator to check that the selected fields have a value during a workflow transition. If any of the specified required fields are empty, the issue will not be permitted to transition, and an error will display.
For example:
- You want to ensure the system field Fix Version/s field has a value before the issue can be transitioned to Done.
- You have a Purchase Order Number database picker field, you want this to be completed before the issue can transition to In Progress.
This validator must be applied to a transition with a screen. When completing this validator, only fields configured in the associated transition screen are listed in the Required Field(s) drop-down.
To find out which screen is associated with a transition, select the transition in your workflow diagram. The associated screen displays. Select the screen name to be taken to the Configure Screen page.
Use this validator
- Go to Administration > Issues > Workflows.
- Select Edit on the workflow you want to add this validator to.
Select the transition you want to add this validator to.
Make sure the transition you're applying this validator to has a screen applied to it.
- Under Options, select Validators.
- On the Transition page, select Add validator.
- Select Field(s) required validator [ScriptRunner].
- Select Add.
- Optional: Enter a note that describes the validator (this note is for your reference when viewing all validators).
Optional: Enter the Condition for which the validator fires. If you leave this blank, the validator will run on all issues in the workflow.
Select Example scripts to help you construct a condition.
- Select the Required Fields.
- Select Update.
Select Publish and choose if you want to save a backup copy of the workflow.
You can now test to see if this workflow validator works. Issues in your chosen project will throw an error if you try to transition the issue without completing the required field(s).