Search for issues that were created on previous month

I would like to know how to refer to previous month in a HQL Jira. For exemple,

JIRA bug open on the previous month

for exemple, in january, I untersdood the HQLwas :

project = XXX AND issuetype = Bug AND created >= 2013-12-01 AND created <= 2013-12-31

but, each month, i can modify the request, for exemple, in feb., i will write :

project = XXX AND issuetype = Bug AND created >= 2014-01-01 AND created <= 2014-01-31

what is the solution for to have a generic request for to have bug open the calendar on previous month, not to have bug for relative day (created > "-31d") or fixed date (created >= 2014-01-01) !

thank you for your help

Regards

1 answer

1 accepted

This widget could not be displayed.

You can try this:

project = XXX AND issuetype = Bug AND created &gt;= startOfMonth(-1) AND created &lt;= endOfMonth(-1)

I try and it's OK ! thank you very much for your help !

Is there any documentation with standard function which is possible to use in JIRA HQL, such as startOfMonth ?

Regards

Great tip--it's easy to forget that those functions like startOfMonth() can accept parameters–the Atlassian documentation doesn't make that clear (to me).

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://abcd.atlassian.net/wiki/dosearchsite.action?cql=space+%3D+"abcd"+and+lastmodified+<%3D+startOfMonth%28-12M%29+and+type+%3D+"page"

Thanks!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

72 views 1 0
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