How do I create a JQL query to capture issues created in the previous month

I need to query for the total number of issues created for the previous month.  For example, if I want to know the total new issues created during the month of August and it is already September, how can I do this with a function so I don't have to modify the query every time it is run?  I can't use startOfMonth() or endOfMonth() since it will return the issues created in October instead of September unless there is a way to use a set back that will give me the previous month.

2 answers

1 accepted

1 vote
Accepted answer

try created >= startOfMonth(-1M) and created  <= startOfMonth()

I'm on Cloud Confluence ... can this be done in a Confluence Search URL? My trail and error has only led to error.... Eg."XXXX"+and+lastmodified+<%3D+startOfMonth%28-12M%29+and+type+%3D+"page"


Thanks that did the trick.  I tried several combinations of that function, just not that one.  Thanks

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

46 views 0 2
Read article

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