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 Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

391 views 6 0
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