specific JQL filter on updatedDate

Phuong Hoang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 22, 2025

I used the following expression to search for tickets that meet a certain criteria as described below:

1) last "updatedDate" was 12 months old or older

updatedDate <= startOfMonth("-12")

2) last "updatedDate" was 2 months and 2 weeks old or older

updated <= startOfDay("-2M-2w")

Are they correct? Do I need to use double quotes inside the parentheses?

Thank you in advance for your answers!

3 answers

2 accepted

0 votes
Answer accepted
Marcos Defina January 22, 2025

Hi @Phuong Hoang

Welcome to the Atlassian community.

I think the only problem you will face is your -2M-2w, which isn't a correct syntax.

Perhaps you should consider an approximation, such as updated <= startOfDay("-6w"), by simplifying one month to 4 weeks, you can accomplish similar results.

Hope it helps!

0 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 22, 2025

Hi @Phuong Hoang

Welcome to Atlassian Community!

Your first one would show issues that has been created within the year, not the ones that are older then 12 months. You would have to change it from less than or equal (<=) to greater than or equal (>=). You can find out more information about operators that can be used in JQL via this KB.

Your second one will not work, the function only support one value, you cannot mix months and weeks like that.

1 vote
Phuong Hoang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 22, 2025

Thank you so much for your quick responses. I'll correct my expressions accordingly. This community team is so awesome. I'm glad that I joined at the right time where I could not find a quick answers with well explanation as such!

Suggest an answer

Log in or Sign up to answer