JQL for due date between last friday and this friday

KRC October 17, 2018

Hi

How to write JQL to pull issues with due>= last Friday and due<= this Friday?

We don't want to use dates as JQL needs to be manually updated every week.

i tried due>= startofweek(-5d) and due<= endofweek(-5d) but this gives a different set of issues compared to jql used with dates like due>=2018-10-12 and due<=2018-10-18

Any suggestions?

Thanks

3 answers

2 accepted

1 vote
Answer accepted
Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 17, 2018

Hi @KRC,

I think your approach is right, but why do you use -5d in both cases.

Here in Germany, where startofWeek would be considered monday, I think this should give the right result:

due >= startOfWeek(-3d) and due<=startOfWeek(4d)

1 vote
Answer accepted
Alexey Matveev
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 17, 2018

Hello,

startofweek begins from Monday for Europe and from Sunday for USA. That is why it should be

 due>= startofweek(-3d) and due<= endofweek(-2d)

or

 due>= startofweek(-2d) and due<= endofweek(-1d)

depending on your settings.

0 votes
KRC October 17, 2018

Thank you @Bastian Stehmann@Alexey Matveev for your response.

startOfweek - Monday works best for us. Both of your queries worked.

Thanks again

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events