Our oncall week starts from Thursday to next Wednesday.
I want to build a filter for search all tickets that crated during these 7 days.
The oncall week is across 2 weeks. startOfWeek may not work as expected.
project = "Oncall" AND created >= startOfWeek(4d)
This will work in Thursday, Friday Saturday of the week-1, but it may not work for Sunday, Monday, Tuesday, Wednesday of the week-2.
On-call week
+-----------------------+
| |
SUN MON TUE WED THU FRI SAT SUN MON TUE WED THU FRI SAT
| | | |
+---+---+ +-----+-----+
| | in these days we need to use:
| +-----> created >= startOfWeek(-3d)
|
| in these days we need to use:
+--> created >= startOfWeek(4d)
How can I combine them to one single JQL, something like this
(created >= startOfWeek( 4d) AND now().dayOfWeek() in (THU, FRI, SAT)) OR (created >= startOfWeek(-3d) AND now().dayOfWeek() NOT IN (THU, FRI, SAT))
But now().dayOfWeek() doesn't work in JQL.