For workflow transitions that have transition screens, you can add validation logic to make sure what the users put in is what you are expecting. This is a great way to ensure data integrity, and we can do this with workflow validators.
In this recipe, we will add a validator to perform a date comparison between a custom field and the issue's create date, so the date value we select for the custom field must be after the issue's create date.
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
Since we are also doing a date comparison, we need to create a new date custom field called Start Date
and add it to the Workflow Screen.
Perform the following steps to add validation rules during a workflow transition:
After we add the validator, if we now try to select a date that is before the issue's create date, JIRA will prompt you with an error message and stop the transition from going through, as shown in the following screenshot: