You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The original answer was pulling updates in the last 3/5 working days. I used this with a NOT criteria to pull the ones before. Which I admit I did not make clear in the original post.
So you can do
AND NOT ( updated >-3d OR (updated > -5d AND updated > startofWeek(-3d) AND updated < startofweek()))
The following identifies issues updated before 3 working days without using NOT.
( (updated <-3d AND updated > startofWeek() ) OR updated < -5d)
Hi @Satish M
Welcome to the Atlassian community where other users try to help each other.
You need to split your problem in to two parts.
The easy part as you have already is the current week within the last 3days
The second part is to look for when the 3 days straddles a weekend. In which case you want to make this 5days but you only want entries that are in last week and not in current week.
so you can add the criteria
updated >-3d OR (updated > -5d AND updated > startofWeek(-3d) AND updated < startofweek(1d))
What this does is look for updated within the last 5 days that are updated since the start of the week beginning on a Thursday and before the start of the week beginning on a Sunday. The important part here is that the -5d will roll forward as the week progresses so on a Monday that will reference Thursday but on Tuesday it will reference Friday whilst the startOfWeek will remain locked on Thursday to Sunday. Once you get to Wednesday the -5d will be Saturday and so will exclude the previous week as you now have Mon-Wed in the current week.
Hope this helps you
Feb 2022 - amended answer to be clear on startOfWeek being defaulting to Sunday.
You need to think about whether you just want the last weekend or all weekends. The solution for last weekend is actually quite straight forward as Jira by default defines the startOfWeek as being Sunday
So you can use
created >startOfWeek(-1d) AND created <startOfWeek(1d)
What the -1d and 1d parameter does is move the date back and forward by one day.
So the first condition looks for created since the start of Saturday and the second criteria makes sure the ticket was created before the start of Monday.
For all weekends I would look to use one of the script Apps to build a custom JQL extension. But others may have better ideas.
Full disclosure I work for Adaptavist so ScriptRunner is my scripting tool of choice but other apps are also available.
My problem is very similar, hence I do not wish to open a new topic of discussion:
Here is my description.
We have a service level agreement (SLA) with our customer facing team. It says once the bug is created, within 3 business days, the status should move to at least "IN-DEV" (closed is not possible as the Queue of tickets is long).
So we have created a custom field called as "SLA breach". This field should have "YES" value if the duration between "NEW" and "IN-DEV" is longer than 3 business days (but exclude weekends).
I know the Automation and I have created the cron jobs to run every night.
My problem is -3d is not excluding the weekend. (So A bug created on Friday, is flagged as SLA breach on Monday itself as Sat and Sun are counted by system)
Can you please suggest me a JQL filter to have the SLA breach for above conditions that will exclude weekends from the counting of "3 days"?
In other words I just want to count business days.
@Phill FoxCould you help me here?
This is what I have:
project = "Delivery Management System" and (labels = DMSE or "Assigned Team" = DMSE) and status not in ("In Release", Released, Open, "Not Done", "Closed") and issuetype = Story AND Sprint in openSprints() AND NOT status changed AFTER -7d
What I need:
Tickets which are not in the mentioned statuses, with the last status update 7 days ago, excluding saturday and sunday.