Field Details: Field Name: Start date, Field : Its a default Jira Field, Field Type: Date Picker (Date only, no time)
Validation Logic: The field must be Mandatory (cannot be null). The date selected must be Today or in the Past. Future dates must be restricted. The comparison must account for Indian Standard Time (IST), which is UTC +5:30.
Hi @Soham Tare
Welcome to the Atlassian Community!
The validator should be written as a Jira Expression, not as a Groovy script.
You can try the following script.
issue.customfield_XXXXX != null &&
new CalendarDate(issue.customfield_XXXXX) <=
new Date()
.plusHours(5)
.plusMinutes(30)
.toCalendarDateUTC()
Replace customfield_XXXXX with the actual ID of your Start date field.
Thanks for the solution, @Gor Greyan
I tested the validator and it works as expected. The mandatory field check and future date restriction are functioning correctly for the Date Picker field.
Appreciate your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Soham Tare
Happy to help, dear!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.