Forums

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

Date Validator

Jacob francois December 4, 2018

I want to create a date validator. The below code works 

issue.get("Priority date for contract execution")>= new Date() + 14

but the problem is I'm using script runner to hide the above field based on answers the user selects. 

 

if (issue.get("Does this contract need to be reviewed and approved by legal?") == "Yes")
{
  
  issue.get("Priority date for contract execution")>= new Date() + 14
}

so I created the above if statement to test the value of a question. 

 

Is there something wrong with my code or there is way to create this same date validator with script runner. 

 

 

 

 

 

 

1 answer

0 votes
Vasiliy Zverev
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 Leaders.
December 4, 2018

To get value from transition screen you should use 

issue.?get("Does this contract need to be reviewed and approved by legal?") == "Yes"
Jacob francois December 5, 2018

 I get a error when trying to put the "?"  

Suggest an answer

Log in or Sign up to answer