Filter by first week of month

Daniel Alonso July 23, 2018

Hi, 

I want to filter Issues by weeks by month, for example I need a filter for the first week of (dynamic) July and so on. Is it possible? I don't want to specify a range of dates to use it dynamically. Thanks.

3 answers

1 accepted

4 votes
Answer accepted
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 24, 2018

What about this?

created >= startOfMonth() AND created < startOfMonth("+7d") 

Daniel Alonso July 24, 2018

Thanks!!! That works!!!

2nd week:

created >= startOfMonth("+7d") AND created < startOfMonth("+14d")  ORDER BY created ASC

And so on. Thanks @Payne

1 vote
Ignacio Pulgar
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 23, 2018

Do you count with ScriptRunner? Is it a Cloud instance? Or is it a Server one?

Daniel Alonso July 24, 2018

Hi Ignacio,

It's a Cloud instance without ScriptRunner installed.

Ignacio Pulgar
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 24, 2018

Hi Daniel,

Then, great that the already accepted answer is good enough for your requirements.

0 votes
jesusoros July 23, 2018

Hi Daniel,

Please let me know if I understand correctly:

You want a JQL that when you run it, the results come as the selected week of the selected month?

Thanks

Daniel Alonso July 23, 2018

Correct, let's said something like:

created >= startOfMonth() and created in weekOfMonth(1)*

*fictional function.

jesusoros July 23, 2018

Hmmmm, Ok in that case there is no information that can dynamically delimit the weeks or the months, either you enter a date for the time frame, or you directly query it.

One option that you can try is to manually adding (because the ammount of variables on the dates that represent the weeks of the months) tags like Week1 Month7 so you can track them. If you observed the method JIRA uses to look for issues is based on information entered on the issue itself, JIRA does not calculate its information, even the =1w variable is default as 7 days.

If you want to sort your issues on the way you're intending will take you a long time and as per my experience, it cannot be done without adding a field that will provide the information to sort it.

Sorry I couldn't help, but I'll stay following this question in case the answer come up :)

Daniel Alonso July 23, 2018

Thanks for taking the time to reply, I will keep trying to do this and if I figure it out how to do it I will post it here.

jesusoros July 23, 2018

That would be awesome Daniel.

Thanks!

Suggest an answer

Log in or Sign up to answer