Is there a way to get the start of week for a specific date, if I want to see what the start of the week is of 2022-11-02, I was hoping I could do something like startofweek(2022-11-02), but it only takes inputs like 1M or 1d.
I want it to be static though so it doesn't change though and is locked in for the start of the week for that specific date
Hi @Joseph
Have you considered using the exact date range? This would give you a static result which you can save for repeated use.
For example, say you want to create a JQL filter that shows me issues from Monday Oct 31st 2022 to Sunday Sept 6th 2022 (a full week range)
1) You could retrieve all issues within the exact date range using the following query (this will give you a static result):
created >= 2022-10-31 AND created <= 2022-11-06 order by created DESC
2) If you want to narrow down your search to a specific project, you can use:
project = SKP AND created >= 2022-10-31 AND created <= 2022-11-06 order by created DESC
*Replace SKP with your desired Project Key
3) If you want to narrow down your search to a specific issue type, you can use:
issuetype = Bug AND created >= 2022-10-31 AND created <= 2022-11-06 order by created DESC
You could combine 2 and 3 by using:
project = SKP AND issuetype = Bug AND created >= 2022-10-31 AND created <= 2022-11-06 order by created DESC
Once you're done > click 'Save As' > Name your filter > Save the filter
Hmm, good point, I may not quite have understood the question!
It is hard to explain this without an essay, so I will use an imaginary example.
Let's say I'm looking for some old issues from a few months ago, but I can't remember the exact date range I need to use. I know I'm looking for "created after the second Sunday in March", so I want to do "created > start of the week which must have contained the 10th March", but I don't have a calendar to hand to look it up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ya, my current solution is just to hard code the start and end date, but I will have to do that each week as I am setting this up as a weekly. newsletter in Confluence that shows what was completed for a given week. I was trying to see if there was an easier way to not have to find the start and end date of each week and just know one of the dates essentially
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I never like hard-coding, unless there's an absolute truth behind it so there's no point doing it another way.
I'm afraid in this case that there is not a simple way to do it.
With a scripting or automation tool, we might have a few options, but the off-the-shelf tools can't do it. (With an app, I can think of ways to do compounded tricks -using "start of week" against a scripted field based on when the issue was created/updated might work, for example)
However, you say
"I am setting this up as a weekly. newsletter in Confluence that shows what was completed for a given week. "
You do not need a fixed date to do that. Surely a newsletter should be reporting on "what we fixed this week", not "everything we have fixed since the beginning of the week starting 10th March 2026"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid not. The startofWeek function only does relative values (so you can do "start of week 6 months ago")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.