How to search for first week of prior year?

I am running JIRA 6.4.8. I would like to create a series of filters to represent weeks of the year, including the prior year.

Current year is easy enough with the StartOfYear() function:

created > startOfYear("+1w") AND Created < startOfYear("+2w")


I am stumped on how to do this for a specific prior year. I tried the above saved as a filter and combined it with (Created > startofYear('-1y') AND created < endOfYear('-1y')) AND filter = 2016W2  but that resulted in: 

Field 'filter' with value '2016W2' matches filter '2016W2' and causes a cyclical reference, this query can not be executed and should be edited.


1 answer

You should omit sign "+" like this: created >= startOfYear(1w) 

That seems to just be optional syntax and does not provide an answer to the question.

As for error - it mean that your filter name is 2016W2. You must not use this filter into JQL statement. You can use any other filter, but not it self. 

At firts just delete this: AND filter = 2016W2

I clarified my question. Please re-read the quest and the description and you'll see I already did what you're suggesting. 

If prior means "previous" then you can try this: created > startOfYear(-52w) ORDER BY created asc.

Anyway it is possible to set any desired date like created > "2015-01-04" ORDER BY created asc

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Thursday in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

261 views 0 12
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot