How to search for first week of prior year?

Matt Snow March 15, 2016

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
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.
March 15, 2016

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

Matt Snow March 16, 2016

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

Vasiliy Zverev
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.
March 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

Matt Snow March 17, 2016

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
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.
March 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