Forums

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

Need to write a query that shows all tasks that have not been updated in greater than 7 days.

Rick M June 28, 2023

I'm using the query:

project = "XYZ" AND resolution = Unresolved AND component = "ABC" AND type = Sub-task AND updatedDate >   "this is where I get stuck how do I define 7 days".

3 answers

3 accepted

1 vote
Answer accepted
Dan Breyen
Community Champion
June 28, 2023

Hi @Rick M welcome to the community!  Try this: and updated <= -7d 

Rick M June 28, 2023

That worked, thank you so much.

0 votes
Answer accepted
Jehan Bhathena
Community Champion
June 28, 2023

Hi @Rick M ,

Adding to the above answers,

I understand your perspective and assure you I have been stuck in this same situation quite a few times :-P

I use the below steps to identify the Date/Timestamps:

* Switch to Basic Query, and chose the time frame you need, and hit search
image.png

* Now switch to JQL, and you'll have the value that you need to use in your complex JQL
image.png

Wrt "updated in greater than 7 days", I don't think setting the updatedDate greater than the current date is a good Idea, since it would not fetch any results :-)

Hope this helps.

Rick M June 28, 2023

Thank you for showing the logic.

Like Jehan Bhathena likes this
0 votes
Answer accepted
Evgenii
Community Champion
June 28, 2023

Hi, @Rick M 

Please, try this query:

project = "XYZ" AND type = Sub-task AND resolution IS EMPTY AND component = "ABC" AND updatedDate < startOfDay(-7d)

Slightly refactored it.

Rick M June 28, 2023

That worked, thank you so much.  This shows there is more than one way of completing this query.

Like Evgenii likes this

Suggest an answer

Log in or Sign up to answer