Forums

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

Date field validation using Jira workflow validator

Sandesh TM
Contributor
October 9, 2023

I am having issue in date field validation using Jira workflow 'Date expression compare' validator. And one strange observation is if I am using '>=' expression for validation against 'now' (todays date) keyword it seems to be working good but if I am using '=' expression for validation against now keyword is not working properly. It is throwing the error even we select today date .

2 answers

0 votes
Ste Wright
Community Champion
October 9, 2023

Hi @Sandesh TM 

Dates fields don't work with "=" that often, as they're captured in the system as date/time.

You need to use multiple validators to get a specific day - eg.

  • Date is >= Start of Day AND
  • Date < End of Day

What's the logic you're trying to validate specifically?

Ste

Sandesh TM
Contributor
October 9, 2023

@Ste Wright 

I need to have a validation that the date field value must be today date only, not any other dates.

Bert van Dijk _TMC_nl_
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.
October 9, 2023

Hi @Sandesh TM ,

 

If you use 2 validators like @Ste Wright is telling, you get the answer you are looking for. Both validators must pass, else the transition will fail.

Ste Wright
Community Champion
October 15, 2023

Hi @Sandesh TM 

Just to check - is this a condition, or a validator? And which one are you using?

Ste

0 votes
Bert van Dijk _TMC_nl_
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.
October 9, 2023

Hi @Sandesh TM ,

 

May I ask, do you have server/data center or cloud?

For cloud, use the following:

date.png

Sandesh TM
Contributor
October 9, 2023

@Bert van Dijk _TMC_nl_ 

I am also using the same as you using.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events