Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JQL query on "target start" or "target end"

Karl Jackson November 3, 2022

How do we create a query to return target dates outside of "now"?

The current query I have is "target end" <now() and status != done

But I want to be able to send a notification outside of the actual due date, and send it 3-5 days before the due date.

1 answer

1 accepted

0 votes
Answer accepted
Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 3, 2022

Hello @Karl Jackson and welcome to the Community!

There's multiple date functions that you can use, such as startOfDay(), endOfDay(), startOfMonth(), endOfMonth(), startOfWeek(), endOfWeek(), and more are available here.

If you want to query for issues that are 3-5 days before the due date, you could do something like:

  • due > startOfDay(-5) and due <= endOfDay(-3)
  • due > -5d and due <= -3d

The "-" goes back in time, so -3d is 3 days ago. 

Hope this helps

Karl Jackson November 4, 2022

thanks, it got me closer given I need to use "target end" this is what ultimately got me there

"target end" > startOfDay(-5) and "target end" <= endOfDay() OR "target end" < -5d and status != done

Sam Nadarajan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 4, 2022

Awesome! If you wouldn't mind accepting this answer so that others can benefit from it in the future that would be great!

For your query, do you need to have parantheses around the last clause:

 

"target end" > startOfDay(-5) and "target end" <= endOfDay() OR ("target end" < -5d and status != done)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events