What time do the startOfWeek and endOfWeek functions start and end?

Deleted user September 19, 2013

Hi,

I have setup a JQL to bring me back a count of issues that were in "On Hold" during the course of last week. Query is as such:

project= XXX AND issueType = project AND status was in ("On Hold") DURING (startOfWeek(-1w), endOfWeek(-1w))

This currently returns 8 issues when I am expecting 9. On investigation i discovered the the one issue that was not counted was updated on sunday evening at about 10pm.

Question: What time does startOfWeek() start and endOfWeek() end? Does it run from Monday 00:00 to sunday 23:59?

Note: Our JIRA locale is set to GMT +2. We are in South Africa.

Hope you clever buggers can help. :)

Thanks

3 answers

1 accepted

6 votes
Answer accepted
Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 19, 2013

Hi Jack,

startOfWeek() starts Sunday 00:00 h

endOfweek() is Saturday just before Midnight

Cheers,

Udo

Deleted user September 25, 2013

Thanks for the feedback Udo. Is this configurable that the start of the week can be set to Monday 00:00 and end of the week be Sunday midnight? This would make it easier for us.

Like Ivaylo Dimitrov likes this
Udo Brand
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2013
Bharadwaj Jannu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 25, 2013
Deleted user September 25, 2013

Thanks again Udo and thanks as well to Bharadwaj. I will pass this info onto our administrators to get it changed.

12 votes
Rebecca B. Weiss February 21, 2017

This is an easy one, no need for admin.  If you want the current week to be Mon-Sun, use "startOfWeek(1d), endOfWeek(1d)".  If you want the previous week to be Mon-Sun, use "(startOfWeek(-6d), endOfWeek(-6d))", and so on.  smile

Kristina Kemmer June 6, 2017

This was incredibly helpful, thanks!

Like Marvin Cabreros likes this
Marvin Cabreros June 20, 2018

Thanks Rebecca. That was brilliant

Deleted user February 18, 2019

Thanks Rebecca!

Like Marvin Cabreros likes this
0 votes
Sean Young November 11, 2020

When would you use startOfWeek(1w)?

I had a query that set 1w and setting 1d (monday) does the same thing.  Now I'm confused.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events