Hello all, 

I'm trying to look through all the JIRA tickets I have and narrow it down by: 

30 day intervals

created bugs

over last 12 months

by team 

 

This is what I have right now:

project = xxxx and issue type = Bug AND createdDate >= 2017-01-01 and created <= 2017-01-31 ORDER BY

Am I on the right track or not even close?

2 answers

1 vote
Ignacio Pulgar Community Champion Dec 07, 2017

You're on the right track.

Just note that dates with no explicit time default to 00:00 hours, so that query wouldn't return issues created during 2017-01-31, except those that might have been created exactly at 00:00 hours.

You may fix it by using "2017-01-31 23:59" instead, or even  < 2017-02-01.

0 vote
Rian Spivak Community Champion Dec 07, 2017

I'll also add on to Ignacio's answer above. If your intention was to hard code the dates into the search, then the above is fine. You can also use the function startOfMonth(). You can put a number inside the parenthesis to go back multiple months. So for a filter for the current month:

project = xxxx and issue type = Bug AND createdDate >= startOfMonth()

For the previous month:

project = xxxx and issue type = Bug AND createdDate >=startOfMonth(-1) and createdDate < startOfMonth()

And So on...

If you want the last 30 days, you can do:

project = xxxx and issue type = Bug AND createdDate >= startOfDay(-30)

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

795 views 2 19
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you