The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can you write JQL query for tickets created in a particular calendar month?

Louise Baker
Contributor
February 9, 2022

In an effort to stay abreast of our tickets, I'm interested in creating a query that will return all unresolved tickets created in the current calendar month, since the beginning of time. Meaning, this query in January would return all tickets created in January, despite the year. In February, it would return all tickets created in February, despite the year. Essentially, return the tickets that are having their birthday that month ;)

This is a unique ask. Is there a way to do this without so much manual work?

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Nic Brough -Adaptavist-
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 Champions.
February 9, 2022

Welcome to the Community!

Yes, this is easy with JQL functions.  Try

created >= startOfMonth() 

If you want to look back to previous months, try something like

created >= startOfMonth(-1) and created <= endOfMonth (-1)

Louise Baker
Contributor
February 10, 2022

This is perfect! I needed to adjust the terms in order for it to do "current month this year, last year, year before that" etc, but this is exactly what I was looking for, thank you!

0 votes
Tuncay Senturk _Snapbytes_
Community Champion
February 10, 2022

Hi @Louise Baker 

Welcome to the community!

Out-of-the-box you can't do that without too much effort. I mean without the year part you can't filter the issues created in particular months. You gave to add lots of OR statements per each year, for instance, if you want to filter for February

   (created >= 2022-02-01 and created <= 2022-02-29) 
or (created >= 2021-02-01 and created <= 2021-02-28)
or ...