Forums

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

What period formats are accepted in JQL search?

Maja Zuchowska September 19, 2023

Hi, I've been playing with JQL search, and while period for days or weeks works fine, I am getting error while going into month (M) or a year (y). Some examples are below:

  • created > -2d (created in last 2 days)
  • created > -4w (created in last 4 weeks)

 

Hovewer this one gets a invalid format error:

  • created > -2M

* I do know the workaround: putting created AFTER and a date 2 months ago.

 

Doesn't Jira JQL provides support for periods greater than a week?

2 answers

2 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
September 19, 2023

Hello @Maja Zuchowska 

As per the documentation for the Created field search, it doesn't support specifying a time period of a month or a year.

https://support.atlassian.com/jira-software-cloud/docs/jql-fields/#Created

You could instead use -60d for 2 months, or -8w.

Another alternative, if you want your criteria to be based on the starting date of a month or year, is to use startOfMonth() or startOfYear()

https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#startOfMonth--

1 vote
Answer accepted
Tuncay Senturk
Community Champion
September 19, 2023

Hi @Maja Zuchowska 

As far as I know, the JQL date handling is designed primarily for days and weeks.

As you mentioned, there is a workaround using the created field with AFTER operator or simply you can try startOfMonth or startOfYear operators.

 

created < startOfMonth(-2)
created < startOfYear(-2)

Other than that, I don't think Jira JQL supports periods greater than a week.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events