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

0 votes
Vasiliy Zverev Community Champion Mar 15, 2016

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.

Vasiliy Zverev Community Champion Mar 16, 2016

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. 

Vasiliy Zverev Community Champion Mar 17, 2016

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 Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

77 views 3 3
Join discussion

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