Forums

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

JQL code for getting weeknumber

Peder Balke March 10, 2022

Hi, 

I have a custom field that I use to write the weeknumber of when a task will be covered. 

Now I want to create a Queue for the Helpdesk where I filter on tasks that will be covered in current week. 

I believe I need to use JQL code in the queue filtering in order to do this.
However, I am not able to figure out what code I can use to get the weeknumber of a certain value. 

So what I would need is the JQL code to cover something like this: 
filter for current week: workweek = weeknum(now() )
or for upcoming week: workweek =weeknum(now() )+1 

Any suggestions? 

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall
Community Champion
March 10, 2022

Hi @Peder Balke 

Unfortunately, this is not possible with native JQL.  You could do something like this to yield the same result though (assuming you're using Due Date):

Due Date >= startOfWeek(7d)
Peder Balke March 10, 2022

Hi Mark, 

thanks for the clear answer. Even though it was not the answer I was hoping for, I can at least stop the search for it. 

We are using due date in a bit different way, but I think I can make something out of startdate instead. 

Thanks again

Mark Segall
Community Champion
March 10, 2022

Yes just replace Due Date with Start Date in the query.  It was just to show how the query would work.

Suggest an answer

Log in or Sign up to answer