Forums

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

Query custom datetime field within the last 5 minutes

Philipp Schenke July 31, 2023

Hello everyone.

I have created a custom datetime field with the name reminder. In this field it should be possible to select a date and time.

Now I would like to query the issues with jql on that specific custom field. I would like to get all issues where the field reminder has a value (timestamp) within the last 5 minutes.
For example when the query is executed on 31th July 2023 9:55am it should return the issues that have the datetime range between 31th July 2023 9:50am to 31th July 2023 9:55am (now).

I tried it with the following jql as expected from other posts
reminder >= -5m

But this seems to has no effect. It returns all the issues that has the reminder field filled in the future.

Can you please help me?

Thank you in advance.

Kind regards

Philipp 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
July 31, 2023

Hello @Philipp Schenke 

Issue where the Reminder field has a value in the future match the criteria you provided - the value is greater than 5 minutes in the past.

If you want to exclude issue where the Reminder value is in the future then you need to add criteria to do that:

and reminder < now()

Philipp Schenke July 31, 2023

Hello Trudy,

thank you very much. I have just tested it and now the query works when I add the now() condition.

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events