Forums

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

Filtering the Done column by maximum date

Elisabeth Norberg June 9, 2020

My filter query currently looks like this:

project = MYPROJECT AND issuetype in (Story, Task) ORDER BY updated DESC

I would like to add in that any cards with the resolution 'Done' that are older than 35 days should not be visible. Unresolved cards older than that should remain.

Could someone help me figure out the correct query? Many thanks in advance

1 answer

0 votes
John Funk
Community Champion
June 10, 2020

Hi Elisabeth - Welcome to the Atlassian Community!

Give this a try:

project = MYPROJECT AND issuetype in (Story, Task) and status changed to Done AFTER startOfDay(-35) ORDER BY updated DESC

Elisabeth Norberg June 10, 2020

Hi @John Funk ,

Thanks for helping! Unfortunately that results in ONLY seeing cards that have been marked as Done in the last 35 days, not any of the on-going issues.

Basically, if an issue is NOT resolution = Done, it should be visible forever. If an issue has resolution = Done, it should only be visible for 35 days. 

The end result should be that my "Done" column gets a bit smaller.

John Funk
Community Champion
June 11, 2020

Okay, let's try this one then  :-)

project = JIRA AND issuetype in (Story, Task) and (status != Done or status changed to Done AFTER startOfDay(-35)) ORDER BY updated DESC

Elisabeth Norberg June 11, 2020

Thanks a lot!

I tried changing "status" to "resolution", but it gave very different results - oddly enough. How would you do it for resolution?

John Funk
Community Champion
June 12, 2020

Just curious but why would you use Resolution instead of Done? 

If you are looking for issues that have other resolutions, which I think you are ;-)

Then try this:

project = MYPROJECT AND issuetype in (Story, Task) and (status != Done or statusCategory = Done and statusCategoryChangedDate >= startOfDay(-35)) ORDER BY updated DESC

Not sure exactly on the -35days part for that so verify your results  :-)

Elisabeth Norberg June 12, 2020

It's because if an issue gets rejected, the resolution is "Done" while the status is not "Done". I want to filter such cards out after 35 days as well, e.g. Any card we won't be working with moving forward should disappear after the specified amount of time.

John Funk
Community Champion
June 12, 2020

The statusCategory part above should take care of that. Where you able to verify the results of the latest one? 

Elisabeth Norberg June 14, 2020

@John Funk It doesn't seem to filter out the cards that have been rejected, as they are not given a Status category in our system.

John Funk
Community Champion
June 16, 2020

How are you denoted rejected cards? And why wouldn't you use a status for those? ;-)

Elisabeth Norberg June 16, 2020

Rejected cards receive the resolution "rejected" and status "done". It's set by my organisation so unfortunately not something I have control over.

Am I right in thinking it's not possible to use resolution in this query then? That would solve all of this.

John Funk
Community Champion
June 17, 2020

statusCategory actually picks those up already. Status fall into one of 3 categories, Done, To Do, In Progress. So if the statusCategory = Done it should get the Rejected ones as well. Did you run the query to see if anything is missing?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events