I try to use startOfMonth(-1) ,but the result is 1st day of last month.
How to get a specific date of last month, by JQL eg: 26th of last month.
Hi @Lei_Li ,
You can simply add a date. for example:
updatedDate >= '2020-02-26'
[Valid formats include: 'yyyy/MM/dd HH:mm', 'yyyy-MM-dd HH:mm', 'yyyy/MM/dd', 'yyyy-MM-dd']
Hi Lei - Welcome to the Atlassian Community!
Can you give us a little more details. Do you need to run the query on a particular day? As in would you say I need to see the issues one moth ago from today? Or is it a set date like Parvaneh suggested? In other words, is this a rolling time that is run periodically?
Thx a lot.
But I want to find a way to calculate automatic.
"In other words, is this a rolling time that is run periodically?"
Yes, for example , It's March, and I want to find issues created before February 26.But the next month, I want to find issues created before March 26 without changing the JQL sentence.
Is it always on the 26th?
The syntax of what you attempted needs quotation marks and to specify the increment, or it will assume m, for example: created = startOfMonth("-1d")
The problem is that Jira would look for exact, based on the time as well, so above would look for start of month -1d at the same time you ran the query. You would need something like:
created > startOfMonth("-4d") and created < startOfMonth("-3d")
Given that different months have different number of days, not sure how you would write that so it is always the 26th, but hopefully this gives you enough info to get something going.
https://confluence.atlassian.com/jirasoftwareserver078/advanced-searching-functions-reference-947191091.html#Advancedsearching-functionsreference-startOfMonthstartOfMonth()
Do you want to see ALL every created before the 26th of last month? Or just the issues created after the start of that month until the 26th?
So, it's March and you want to see EVERY issue create before February 26? Or do you just want to see issues created between February 1 and February 26?
Hi @Lei_Li
I have the exact same use case as yours. I can see that other answers did not get your problem (which is: "getting the 26th of last month automatically, meaning without having to update the JQL at every month start").
Did you find anything?Thanks,Vincent
Hey Vincent,
The only think I know to do is to create a cron using Automation for Jira that would run on the 26th of each month for issues created now minus one month.
It looks like you're new here. Sign in or register to get started.