A filter for issues created last 7 days and did not updated last 7 days

Elif Alverson July 12, 2017

Hello, 

This is the filter I came up with however I dont think it is working. Any idea what needs to be changed?

project = IT and created >= -7d and updated <= -7d and status not in ( Resolved , Closed )

 

Thank you.

Elif

5 answers

4 votes
Stephen Deutsch
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.
July 12, 2017

Hi Elif,

The syntax of your query seems OK (although you may have to surround the -7d in quotes: "-7d"

However, the logic of your query might not be what you want. The act of creation of a ticket is also included in the updated date, so by that logic, any ticket created in the last 7 days will have been updated in the last 7 days.

This might be closer to what you're expecting:

project = IT and created >= "-7d" AND NOT status changed

This would find all tickets that have been created in the last 7 days that have not yet made a transition.

Elif Alverson July 12, 2017

Stephen,

Thank you for your response. We would like to see the tickets created in last 7 days and never been updated since they are created. Most of the time IT tickets are being updated without the workflow status changed. IT engineers contact to reporters asking questions about the issue using the comments field in Jira and they don’t change the status of the ticket. Is there any way to capture that?  

 

Elif

Stephen Deutsch
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.
July 12, 2017

It won't work out of the box, but if you install the JIRA Toolkit Plugin (or make sure it's enabled if you are using Cloud), then the following query should work:

project = IT and created >= "-7d" AND NOT status changed and "Number of comments" > 0

Elif Alverson July 12, 2017

Stephen, 

What is I use this filter below. Do you think it works? 

project = IT and created >= "-7d" and updated <= "-6d" and status not in ( Resolved , Closed )

I am confused about the " updated " statement for the jira filters. If it does not include the workflow transitions , what does it include? I thought every update done to an issue can be capture with " updated" statement.

Thank you.

Stephen Deutsch
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.
July 12, 2017

"Updated" does include workflow transitions, but it does not include comments.

As I stated earlier, though, the act of ticket creation itself is included in the "updated" field. A ticket cannot be set as updated earlier than its creation time. Therefore, the statement that you listed above will find issues that have been created or updated exactly 7 days ago, and anything created in the last 6 days will not be included in the results (because the act of ticket creation also sets the updated field to the date of ticket creation, and that date would be greater than 6 days ago).

Elif Alverson July 12, 2017

What is the way to see if there is a comment posted on an issue or not?

Just to have JIRA Toolkit Plugin? Cannot be done via filters?

Stephen Deutsch
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.
July 12, 2017

Ok, I found a way to do it without installing a plugin:

project = IT and created >= "-7d" AND NOT status changed and comment !~ "FIND_ISSUES_WITH_COMMENTS"

This will return all issues with comments that do not contain "FIND_ISSUES_WITH_COMMENTS", which would be all of them ;)

Elif Alverson July 12, 2017

Stephen, 

Thanks for your response. But the filter you have provide shows the list of issues with the comments in them. I need the issues with no comments in them for last 7 days which is since they are created :(

Stephen Deutsch
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.
July 12, 2017

Unfortunately I couldn't find any other way using pure JQL without installing the JIRA Toolkit Plugin. One option would be to search for all tickets that DO have a comment in the last 7 days, export those issues, copy the issue keys, and then search for all issues that don't include those issue keys.

But I think just installing the plugin would be easier ;) It's free too and seems to be well supported.

Elif Alverson July 12, 2017

Stephen, 

Thank you for your time!

Elif

Elif Alverson July 26, 2017

Stephen , 

Jira Toolkit Plugin has been downloaded to our system. However I am not sure how it will provide me the filter I need for the IT project tickets which are created last week and never been updated by the assignee? 

Like " Days since last comment" which I would like to use , it is not searchable or sortable. How am I going to use this for my Kanban board?

Documentation is not very helpful.

Thank you.

 

Elif

Jason Ambrose April 27, 2018

Try this:

issueFunction in lastComment("before -7d") and created >= -7d AND status not in (Close, Closed, Abandoned) 

Like Vijayakumar Gundappa likes this
3 votes
Karmandroid Singularity August 5, 2020

try with "created >= startOfDay(-7d)"

Adrian Fallas September 12, 2022

This worked beautiful for me!

Krista Schlumpberger February 3, 2023

Thanks @Karmandroid Singularity

This worked for me as well! 

1 vote
Jehan Bhathena
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 24, 2023

Hi @Elif Alverson ,

Try :

created >= -7d AND issuekey not in issueHistory()

This will list all new issues with no actions taken on them.

(Lol, just noticed this ticket is more than 4 yrs old)

0 votes
John Corwith August 16, 2021

I just had to do this and pieced together something that works for Enterprise and wanted to post it so others don't have to spend time piecing it together:

AND created >= -7d AND NOT updatedDate >= -7d

will give you issues that have been created in the last 7 days and haven't had a status change or comment in the last 7 days which was the original intent of the question.

0 votes
Jason Ambrose April 27, 2018

issueFunction in lastComment("before -7d") and created >= -7d 

Suggest an answer

Log in or Sign up to answer