Help with JQL query to return changed issues

Dina Barnese UA September 7, 2018

I have this JQL query which is written to bring back issues that have changed to Done or Resolved in the past two weeks. It is returning the correct components and task types however also returning older items prior to August 27, as well as items that are "In Progress" or "Analysis" - help? 

 I've tried putting parenthesis around the STATUS statements but that resulted in error. The query below works, but doesn't return the correct results. I'm stumped. 

project = ISO AND issuetype in (Task, Sub-task) AND (status changed to Done or status changed to Resolved DURING ("2018/08/27","2018/09/07")) AND (component = "Solution - Awareness & Training" or component = "Program - Awareness & Training")

1 answer

1 accepted

2 votes
Answer accepted
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 7, 2018

Hi Dina,

When you ask jira with "(status changed to Done or status changed to Resolved DURING ("2018/08/27","2018/09/07"))" it will retrieve all issue that were in the Resolved or Done status regardless wich status they will be after. 

 

For example if during 2018/08/27","2018/09/07 an issue changed to done but in the same week change again to another status it will be on you JQL result.

 

Can you try this:

and status changed TO (<your status>,<your status>)

Dina Barnese UA September 7, 2018

Mohamed, 

Thank you, this worked. I'm working to understand why the list works as opposed to the OR statement... why doesn't it also select items where status changed to Done or Resolved during my timeframe, even if they were switched to something else after? 

Thanks very much!

Dina

Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2018

Hello Dina,

I tried this and it worked well.


AND (status changed TO ('in progress','planned') during ('2018-08-01','2018-09-08')) AND (component = test or component = test2)

My list show issue that changed to planned or progress during the timeframe even if they change juste after.

In my case it select some issue in done status but if i go through history issue i will be able to see that the ticket changed to planned or progress during my tymeframe.

For you timeframe feel free to use startofweek() you will be able to run the filter everytime you want without change timeframe value manually.In you case it will be something like that (startofweek(-2),startofweek())

 

Let me know if i was clear.

Sorry for my english is not my native language.

 

Regards.

Dina Barnese UA September 10, 2018

Thank you! 

My query is working good now. I am using dates rather than startofweek() because I run this report each week with new dates, and want to show the managers what was complete. This is working, I appreciate the help!

Dina

Suggest an answer

Log in or Sign up to answer