Forums

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

JQL Query for Calendar Week Ahead

Tarfon, Carla February 6, 2022

I need a JQL query so i can create a filter which will pull issues scheduled for the CURRENT Mon-Fri calendar week.

I've found the below query which works and pulls the LAST calendar week info of issues done for a particular team/board (NewsDNA Commercial Design):

project = "NewsDNA Commercial Design" AND resolved >= startOfWeek(-1) AND resolved < endOfWeek(-1)

But I also need one which will pull the CURRENT week's info. To clarify - the current week info can capture all resolved or active issues to be done/that are scheduled in for the week (so not just resolved or completed items).

HELP PLEASE!! 

3 answers

3 accepted

1 vote
Answer accepted
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 6, 2022

Hi @Tarfon, Carla 

Welcome to the Community!!

Monday to Friday right?

Here it is :-)

due >= startOfWeek("+1d") AND due <= endOfWeek("-1d")

Please note this will return all issues that are due this week

You could start exploring dates by editing JQL in a basic format

Basic JQL.png

Thanks

Tarfon, Carla February 6, 2022

Thank you! What about if the due date is still later than end of week, but is actually being worked on this current week...? This is the problem i'm having now with these later dates not pulling through. 

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 8, 2022

Include only this part

due >= startOfWeek("+1d") AND updated >= startOfWeek("+1d")

to find out issues that have due date and updated issues from current week starting monday

Use time range and get comfortable with JQL Functions to dynamically adjust the weekly issues

  • startOfWeek() - will resolve to Sunday 00:00
  • endOfWeek() - will resolve to Saturday 11:59

Here's the doc

https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-functions/#Advancedsearchingfunctionsreference-startOfDaystartOfDay--

Thanks,
Pramodh

Like Tarfon, Carla likes this
1 vote
Answer accepted
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 6, 2022

Are you using "due date" for this? If so then maybe the following will work for you.

project = "NewsDNA Commercial Design" AND duedate >= startOfWeek() AND duedate < endOfWeek()

Tarfon, Carla February 6, 2022

thank you! I'm now having trouble pulling through any jobs that may have a later due date than the current week, but are actually being worked on IN the current week.... I'm not sure if this can ever be done without knowing exactly what jobs are scheduled in for the week and putting them in manually :( 

Bill Sheboy
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.
February 7, 2022

Hi @Tarfon, Carla 

Adding to Jack's suggestion: to also include the in-progress items which are due *after* this week, please try:

project = "NewsDNA Commercial Design" AND duedate >= startOfWeek() AND (duedate < endOfWeek() OR statusCategory = "In Progress") ORDER BY Key

Kind regards,
Bill

Like Tarfon, Carla likes this
0 votes
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 6, 2022

Hi @Tarfon, Carla,

The key to what you are trying to achieve is in how you identify what is scheduled to be worked on in the current week.

The JQL queries shared by both @Pramodh M and @Jack Brickey show a correct way of searching for Jira issues. If you schedule issues to be worked on with another date custom field than due date, you could just replace due date with that other field.

As an alternative, you could also look at the way you plan work in Jira. If you set up a scrum board for scheduling, you could create sprints on e.g. weekly basis and add the items that should be worked on to them. JQL allows you to filter for all the issues in the active sprint like this:

sprint in OpenSprints() 

An additional advantage would be that you can see all the active issues in one single view on that scrum board, without any further JQL being required. This would require considering the way you organise planning, but that is not necessarily a bad thing!

Hope this helps!

Tarfon, Carla February 8, 2022

Thanks Walter!

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events