Forums

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

Dynamic JQL-query for a fixed day of the week

RM July 5, 2022

Hi Community, 

I have a question regarding a JQL-query:

I need to create a query that recognizes, for example, the first Monday of the month. Is this even possible with a JQL query?

I have already tried the possibilities with startofweek or startofmonth etc..These work of course in principle, but have a certain fuzziness in the results (because of the wandering dates),if I do not manually change the + and - days in my query. Is there perhaps an automated way to do this?

Basically I am open for all possible solutions that go beyond a JQL query (e.g. create a dummy or similar).

Thanks for the help,

Robert

 

2 answers

1 accepted

2 votes
Answer accepted
John Funk
Community Champion
July 5, 2022

Hi Robert - Welcome to the Atlassian Community!

You are not going to be able to use dynamic values as such in JQL. 

RM July 11, 2022

Unfortunately, this is what I feared. Thanks for the confirmation of my thoughts

Like John Funk likes this
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.
July 5, 2022

You can do something like the following. You may need to massage it and/or expand it a bit, but this is an example that returns issues created on the first Monday of the current month.

created >= startOfMonth() and created < startOfMonth(7d) and created >= startOfWeek(1d) and created < startOfWeek(2d)

Suggest an answer

Log in or Sign up to answer