Need help with these JQL queries (issues done yesterday & day before yesterday)

Levan Khutsishvili November 12, 2018

Hello,

Can anyone help me to write JQL's

I need to search tasks which where done yesterday and also tasks which where done day before yesterday
I know that they can be searched from issues and filters section but i need them in quick filters

 

thanks in advance

1 answer

1 accepted

1 vote
Answer accepted
Grigory Salnikov
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.
November 12, 2018

Hi @Levan Khutsishvili and welcome to our Community!

I think you need something like this:

project = <project name> AND resolution = Done AND resolution changed AFTER startOfDay(-1) BEFORE endOfDay(-1) 

for issues done yesterday and

project = <project name> AND resolution = Done AND resolution changed AFTER startOfDay(-2) BEFORE endOfDay(-2) 

for issues done the day before yesterday.

Hope this helps.

Levan Khutsishvili November 12, 2018

Hello Grigory,

Thanks for quick feedback. I'll try them out and let you know.

Like Grigory Salnikov likes this
Levan Khutsishvili November 12, 2018

It worked! thanks a lot Grigory 

Like Grigory Salnikov likes this
Grigory Salnikov
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.
November 13, 2018

You're welcome, Levan :)

Should you encounter any other difficulties don't hesitate to come back here.

Have a nice day!

P.S. You may also want to mark the answer as "Accepted" so that other people with the same or similar question would find it easily. To do it just click on the "Accept answer" green button.

Like Levan Khutsishvili likes this
Levan Khutsishvili November 14, 2018

Hello Grigory, 

Today i have noticed that task which was moved to the column "done" today, still visible on this filter (see below) with all the tasks which were done yesterday => http://take.ms/TFy7a 

project = <project name> AND resolution = Done AND resolution changed AFTER startOfDay(-1) BEFORE endOfDay(-1
Grigory Salnikov
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.
November 14, 2018

Hi!

I can't open the link you provided due to some error:

{"error":102,"error_description":"field corrupted","result":true}

I've tested it in my environment (moved issue to the "Done" column) and applied the JQL. Everything works as expected.

Let's find the reason for the issue together. What else have you noticed? Are there other issues with the same behavior?

Levan Khutsishvili November 14, 2018

try this one => http://prntscr.com/li5ne0 

Like Grigory Salnikov likes this
Grigory Salnikov
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.
November 14, 2018

Yes, the last one worked.

So, you say the lowest issue was moved to the "Done" column today, right?

done.jpg

By the way, what does the date on the card layout mean? I'd like to see the field name. 

Grigory Salnikov
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.
November 14, 2018

Zoops :)

I have an idea to try. What if we change "resolution" to "status" in our JQLs? Would it make everything straight?

Could you please try it out?

Levan Khutsishvili November 14, 2018

Yes, this task was moved to done today.
Filed name is "updated"

Levan Khutsishvili November 14, 2018

I have changed JQL as you suggested 


Before
project = "project name" AND resolution = Done AND resolution changed AFTER startOfDay(-1) BEFORE endOfDay(-1) 


After
project = "project name" AND status = Done AND status changed AFTER startOfDay(-1) BEFORE endOfDay(-1) 


now it shows me all resolved/done issues 

Grigory Salnikov
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.
November 14, 2018

Ok, I see. Try also the following ones:

project = "project name" AND status = Done AND status changed AFTER startOfDay(-1) AND status changed BEFORE endOfDay(-1) 
project = "project name" AND resolution = Done AND resolution changed AFTER startOfDay(-1) AND resolution changed BEFORE endOfDay(-1) 
project = "project name" AND resolution = Done AND status changed AFTER startOfDay(-1) AND status changed BEFORE endOfDay(-1) 
project = "project name" AND status = Done AND resolution changed AFTER startOfDay(-1) AND resolution changed BEFORE endOfDay(-1)  

I've added "... AND <fieldname> changed BEFORE..." everywhere.

One of four should work.

Levan Khutsishvili November 14, 2018

Thanks a lot Grigory!
I'll try them and let you know 

Like Grigory Salnikov likes this
Grigory Salnikov
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.
November 14, 2018

If none of these helps, we could try to narrow down the search conditions.

Levan Khutsishvili November 14, 2018

Unfortunately none of them worked. 
first and third did nothing. second and fourth showed same result as your first solution (3 issues that were done yesterday  and one which were done today)

Levan Khutsishvili November 14, 2018

Thank you for your try Grigory ;)

Grigory Salnikov
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.
November 14, 2018

Ok, I don't actually know what happens here.

Could you please report more issues with the same behavior if they appear, and we'll try to figure it out.

Meanwhile, I'll also perform some testing.

Levan Khutsishvili November 14, 2018

@Grigory Salnikov I i have found solution. This is how it looks
updatedDate >= startOfDay(-1) and updatedDate < endOfDay(-1) AND statusCategory = Done order by updated DESC

Like Grigory Salnikov likes this
Grigory Salnikov
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.
November 14, 2018

Yes, this looks good. 

Keep in mind, though, that if someone changes something in a "Done" issue, it becomes updated and the results would no longer be accurate.

I mean, if the issue was transferred to "Done" and later updated, your search will reflect not the day it was transferred to "Done", but the one it was updated on.

You can forbid updating "Done" issues, though (with the help of jira.issue.editable flag)

Like Levan Khutsishvili likes this

Suggest an answer

Log in or Sign up to answer