Forums

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

Date comparison issue

Aisha M
Contributor
January 27, 2020

When I run the query, "User" = abc and "Program Epic Due Date" <= now(), I get few issues. 1 of the result, APC-15 ,is incorrect as its Program Epic due date is 28/Feb/20.

When I run the following query, "User" = abc and "Program Epic Due Date" <= -1d, where I replace now with -1d, I do not get APC-15 which is the right record.

This does not happen with the usual JIRA Date fields. The Program Epic Due Date is a scripted field.

 

Can someone please help me with the reason for this, and how to fix it.

 

Thank you

2 answers

0 votes
Payne
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.
January 27, 2020

Your field may have the incorrect Search Template chosen. Go into custom fields (type gg or . and then type custom fields), type your field name, click the cog and choose edit, and set the Search Template to Date Time Range picker. May need to perform a reindex after doing this.

-Payne

Aisha M
Contributor
January 28, 2020

@Payne  Hi Payne. Thank you for the comment. The scripted field template is a DATE TIME RANGE picker.

0 votes
Olga Videc
Community Champion
January 27, 2020

Hello @Aisha M 

"Program Epic Due Date"  <= endOfDay()

BR, Olga

Aisha M
Contributor
January 27, 2020

Hi @Olga Videc , Can you please help me with the reason for the above problem. Thank you

Olga Videc
Community Champion
January 27, 2020

Hello @Aisha M 

Okay found it, so simple you need to use duedate < now() 

now() does not support <=     it supports <=WAS* but not <= 

Also make shure your custom field is Date/Time template 

BR, Olga

Suggest an answer

Log in or Sign up to answer