Is it possible to filter jql results by Month?

Casey Harford May 2, 2013

Right now, I have a JQL query like this:

project = "Customer Experience" AND status was Reviewing after "2013/01/01" AND status was Reviewing before "2013/02/01"

Instead of using "before" and "after", is it possible to just specify a given month, maybe by name(ie. January), instead of these date ranges?

4 answers

1 accepted

34 votes
Answer accepted
dnhoang
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 7, 2016

There is one way you can filter as the last month or the last two month etc...

Ex:

the last month: created > startOfMonth(0) ORDER BY created DESC ,

last 2 month: created > startOfMonth(-1) ORDER BY created DESC.

 

Similar for startOfDay(), startOfWeek() and startOfYear()

Nick Wade April 27, 2018

These are excellent. Thanks!

Marek Vejrosta September 17, 2018

Thanks!!!!

Surfaraz T December 14, 2018

Hi @dnhoang,

 

Can u please tell how this filter works?

Ingenieria February 15, 2019

Thanks !

Zarko Ajdinovic February 7, 2020

Actually, startOfMonth(0) will list items from the CURRENT month,

where startOfMonth(-1) will list for the last month, etc...

Like Jason Fitzgerald likes this
Romel August 12, 2020

updated >= startOfMonth(-1)AND updated <= endOfMonth(-1) should give you all the issues updated in the last month. change the fields according to your business need.

Like # people like this
Rob Horan
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.
August 12, 2020

It would be great if Atlassian could build new easy JQL for full month searches.  I'm all in on simplifying the user experience without loss of functionality.  No reason we couldn't keep the existing functions AND new ones.

It would be helpful to have a detailed, real-world example guide. 

Like Anwar likes this
1 vote
Rob Horan
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.
October 2, 2015

I'm going to get a rep for being the cranky old man on the block, but it seems absurd that we can't simply specify a month and year as search critera.  All issues created in September 2015.  Bam!  

This is a serious issue for me, as I just found that my monthly reports have been omitting issues created on the last day of the month when using JQL like this:

created >= 2015-09-01 AND created <= 2015-09-30

If you create a Basic search between two dates and then convert it to JQL you get that format.

This is a serious bug.

Matt Hurst-Smith March 8, 2016

Not sure if this is still relevant to you, but if you use "2015-09-30 23:59" instead of just the date, this will return all issues created right up until 11:59pm (in whichever Time Zone your JIRA is set to) on that date.

Unless an issue is created during that final minute, you should catch everything. Not ideal, as it does leave room for error with that final unaccountable minute, but should be enough of a workaround.

NB: you'll need to use the speech marks around the date and time

 

Rob Horan
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.
March 8, 2016

Its pretty ridiculous.  Adding an end date should include the entire day by definition.   But thank you!

Matt Hurst-Smith March 8, 2016

Yeah it's pretty mental, I think it's something to do with the fact that JIRA assumes the day to end at midday or something. 

Rob Horan
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.
March 8, 2016

That would make more sense.  Nope.  Its exactly midnight at the start of the end date, effectively removing the end date from the query entirely.

dm February 5, 2018

You can achieve this by searching for all dates greater than 1st Sept and less than 1st October.

Nick Wade April 27, 2018

This is the correct answer from @dm, even with the <= implying something else.

Sergey Maximov February 24, 2020

Instead of 'created >= 2015-09-01 AND created <= 2015-09-30'

you can do 'created >= 2015-09-01 AND created < 2015-10-01'

Like tomy.fung likes this
1 vote
Bhushan Nagaraj
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.
May 2, 2013

JQL allows you to use a data like 2013/01/01

or

the format 30d (30 days)

What you are looking for is not possible in JQL.

Casey Harford May 2, 2013

Not the answer I was looking for, but kind of figured this was going to be the case. Thanks for confirming.

0 votes
Arun Singh July 10, 2019

Can anyone please help me with a filter to search items moved to a specific status after 12:00 noon of every alternate wednesday?

Bob Davis July 18, 2019

Export your filter results to Excel. Split the date column by spaces. use =TEXT(A1,"DDDD") to get day of week. Filter results to just Wednesday.

Suggest an answer

Log in or Sign up to answer