Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for help on date ranges - JIRA

Mary Mark October 8, 2018

Hi Atlassian Community:

I'm looking to create a JQL query in JIRA to report tickets/issues based on:

  • Current week period defined as Friday 12:01 AM to Thursday midnight

I currently have the following:

project = "xxx" and created >  startOfWeek(-2d) and created < endofweek(5d)

Please advise is this is correct.

 

Thanks.

 

1 answer

0 votes
Payne
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.
October 8, 2018

That looks correct to me, and I ran a couple of tests on my system that corroborate it.

Mary Mark October 8, 2018

Hi Payne

Thank you for your response. Is there anyway I can capture the date/timestamp in the startofweek and endofweek function?

I understand that the default is :

startOfWeek() starts Sunday 00:00 h

endOfweek() is Saturday just before Midnight

I guess it's just because my date criteria is defined as Friday 12:01 am to Thursday midnight.

Thanks

Payne
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.
October 8, 2018

Best I can tell (maybe someone can chime in to definitively answer) is that adding/subtracting days maintains the time; in other words, startOfWeek() is Sunday at 00:00, startOfWeek(-1d) is Saturday at 00:00, startOfWeek(-2d) is Friday at 00:00, etc.

Mary Mark October 8, 2018

If I do this: project = "xxx" and created >  startOfWeek(-2) and created < endofweek(5)

without the "d", the results yield very differently.

Payne
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.
October 8, 2018

Sorry, I mistakenly omitted the 'd' in my examples. I have edited to correct.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events