Forums

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

JQL filter question, only DONE issues during month

Daniel Ronnstam April 25, 2022

Hi. I seem to not be able to figure out how to write this JQL filter;

A filter that only shows stories/tasks that have arrived at status DONE during a specific month (set in the filter), with a specific team member as assignee in DONE. 

But, the resulting list must show ALL stories/task whenever they were created, that ARRIVED at DONE during the specific month.

The filer should NOT show issues that were located in DONE during the entire month, or where first in DONE then moved elsewhere during the month.

2 answers

0 votes
Tessa Tuteleers
Community Champion
April 25, 2022

Hi Daniel, 

Status is luckily one of the few fields that keeps history in JQL, so you can do this quite easily like this: 

resolution = Done AND assignee = ... AND status changed TO Done AFTER "2022/02/01" AND status changed TO Done BEFORE "2022/02/28"

You can find info about CHANGED or WAS here

Hope this helps!

- Tessa

Daniel Ronnstam April 26, 2022

thanks will try this

Daniel Ronnstam April 26, 2022

I'm sorry but the filer gets green light but when I search I get no results on no assignee nor month. Wht do I do wrong?

Tessa Tuteleers
Community Champion
April 27, 2022

Hi @Daniel Ronnstam , 

just an extra question when reading your initial request. 

The assignee, is it still set now? Or do you need the assignee from when it was transitioned to Done but it's perhaps unassigned now? 

 

Please try to work from a bigger selection and narrow done to see where the problem is. 

1) filter stories and tasks.

issuetype in (Story, task)
  • Do you still have issues? 
  • Check the resolution date of the issues, do you have issues that are resolved in - for example - february? If no, try another month. If yes, go to next step. 

 

2) filter the month that the issue must have changed to done as well

issuetype in (Story, task) AND status CHANGED TO Done AFTER "2022/02/01" AND status CHANGED TO Done BEFORE "2022/03/01" 
  • Do you still have issues? You should find at least the issue you checked in the previous step.
    • If not, you are looking for the done status, is the resolution set when you enter the done status? You can check by instead searching for the resolution. 
    • If it is not the same, you need to check some transition dates manually, find and issue that you know (by just knowing or checking the history) transitioned to done a given period of time and change your filter to reflect that period. You should find that issue

3) filter for the assignee

// assignee is still this person now

issuetype in (Story, task) AND status CHANGED TO Done AFTER "2022/02/01" AND status CHANGED TO Done BEFORE "2022/03/01" AND assignee = tessa.tuteleers

 

// assignee was assignee in that time period (that's the closest you will get to finding an assignee in a specific status if it has been changed by now)

issuetype in (Story, task) AND status CHANGED TO Done AFTER "2022/02/01" AND status CHANGED TO Done BEFORE "2022/03/01" AND assignee was 5d836a44c75e070c2d0b5676 AFTER "2022/02/01" AND assignee was 5d836a44c75e070c2d0b5676 BEFORE "2022/03/01"
  • Do you still have issues? voila! 

(!) Perhaps There just are no issues for your JQL available. Make sure you always have at least 1 issues you KNOW must match the JQL. Either by finding it in an existing project, or by manually creating and manipulating it just for this test. 

 

Please always try to debug you queries in that manner, to know where you problem might live.l Then we can also help you better by knowing what you have already tried, and where exactly the problem is. A compound JQL (with many different individual conditions (dates / users / issuetypes)) is more difficult to debug for us. 

- Tessa

Daniel Ronnstam April 27, 2022

I still can't get it to work, but will search for errors.

But, what I'm thinking is that each ticket that is filtered to show should also REMAIN in status DONE when the filtering is made. Otherwise, I get tickets that arrived at DONE during the month, but then moved elsewhere?

Sreenivasaraju P
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.
April 27, 2022

Hi @Daniel Ronnstam ,

If that is the case you can add one more criteria "and status =done" for the suggested queries.

like 

issuetype in (story,task) and status = done and assignee = daniel and status changed TO done DURING ("2022/03/01","2022/03/31") 

Like Trần Văn Huy _BO_HN_ likes this
0 votes
Sreenivasaraju P
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.
April 25, 2022

Hi @Daniel Ronnstam ,

You can try below query

issuetype = Story and status changed TO done DURING ("2022/03/01","2022/03/31")

 

You can change the dates as per your requirement

Daniel Ronnstam April 26, 2022

Ok.. but what about tasks? 

Daniel Ronnstam April 26, 2022

Thanks for your answer, but when I try to set this filter, I don't get any results, although I know stories have arrived at done during the month. I tried several months.

Sreenivasaraju P
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.
April 26, 2022

you can include task 

issuetype in (story,task) and status changed TO done DURING ("2022/03/01","2022/03/31") 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events