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

JTRunner September 14, 2014

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
Answer accepted
Udo Brand
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.
September 15, 2014

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

Chris Wallingford May 24, 2017

I'm on Cloud Confluence ... can this be done in a Confluence Search URL? My trail and error has only led to error.... Eg.

https://xxx.atlassian.net/wiki/dosearchsite.action?cql=space+%3D+"XXXX"+and+lastmodified+<%3D+startOfMonth%28-12M%29+and+type+%3D+"page"

Thanks!

0 votes
JTRunner September 15, 2014

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