How to prevent users from selecting previous or past date in date type custom field
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
This KB is not applicable for Jira Service Management customer portal. Please see: JSDCLOUD-545 - Getting issue details... STATUS
Purpose
This article will help to prevent users from selecting past date, hence they can only choose today or future dates.
Solution
This can be achieved by adding a workflow validator in the Create issue transition. The step by step process is given below.
- Go to Project settings > Workflows > Edit the desired workflow > Select the diagram mode > select the "Create" transition > Validators.
- On the next page, click on "Add validator" and choose the Date Compare validator
- Date: select your preferred Date type custom field
- Condition: Select >=
- Compare with: Expression with now as a value
- Add
- Publish Draft > Publish