Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Validation in Due date

Swarna Radha
Contributor
June 16, 2019

Hi,

I added a script validator on create screen that user take due date on today or future date not old date.

When testing the script, i allow to put old date and the issue is created.

Please see script below:

issue.dueDate.before(Calendar.getInstance().getTime())Screenshot_1.pngThanks,

Swarna

1 answer

1 accepted

0 votes
Answer accepted
Andrew
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 17, 2019

Hi @Swarna Radha ,

You said 'on today or future date not old date.' but use opposite 'before'. And Your 'error msg' mean that duedate must be old date.

'issue.dueDate.before(Calendar.getInstance().getTime())' - that mean condition 'DueDate is before (today) ?'

If You want deny set old date try use 'after'.

B.R.

Swarna Radha
Contributor
June 17, 2019

Thanks :)

Kallepalli Mahesh Babu
October 30, 2024

 

@Swarna Radha @Andrew 

Please help me with simple scripted validator "Due date should not be the past date"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events