Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is it possible to filter jql results by Month?

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

33 votes
Answer accepted
dnhoang Atlassian Team Jun 07, 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()

These are excellent. Thanks!

Hi @dnhoang,

 

Can u please tell how this filter works?

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

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 Thomas Rohrer likes this

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. 

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.

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

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.

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

 

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

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. 

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.

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

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

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

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

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
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you