Making a field required during workflow transition

Using field configuration to make a field required will make the field required all the time. There are many use cases where you will only need the field to be required during certain workflow transitions.

Getting ready

For this recipe, we need to have the JIRA Suite Utilities add-on installed. You can download it from the following link or install it directly using the Universal Plugin Manager:

https://marketplace.atlassian.com/plugins/com.googlecode.jira-suite-utilities

How to do it…

Perform the following steps to make the Reason for Backlog field required during the Move to Backlog transition:

  1. Select and edit the Simple Workflow.
  2. Select the Diagram mode.
  3. Click on the Move to Backlog global workflow transition.
  4. Click on the Validators link from the panel on the right-hand side.
  5. Click on Add validator, select the Fields Required validator from the list, and click on Add.
  6. Select the Reason for Backlog field from Available fields and click on Add >>. This will add the selected field to the Required fields list:
    How to do it…
  7. Click on the Add button to complete the validator setup.
  8. Click on Publish Draft to apply the change.

After you have added the validator, if you try to execute the Move to Backlog transition without specifying a value for the Reason for Backlog field, JIRA will prompt you with an error message as shown in the following screenshot:

How to do it…
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset