Hi. I'm trying to setup a JQL query to setup 3 queries. One to get all issues created this January, one for January of last year, and one for January of 2 years ago.
The first one works:
project = "SomeProj" AND createdDate >= startOfYear("-0m") AND createdDate < endOfYear("-11m") ORDER BY createdDate ASC
I assumed I could just extend the month offsets like so to get 1 and 2 years back:
project = "SomeProj" AND createdDate >= startOfYear("-12m") AND createdDate < endOfYear("-23m") ORDER BY createdDate ASC
project = "SomeProj" AND createdDate >= startOfYear("-24m") AND createdDate < endOfYear("-35m") ORDER BY createdDate ASC
However, when I do this, it always seems to give me results for January of this year. It's like, if you go beyond 12 months, it "wraps" / doesn't inc/dec the year.
Anyone know if I'm missing something here or is this just the behavior of the functions? If it is the behavior, anyone have a clever solution for writing "dynamic" queries that are valid for a specified month of the trailing n years?
Thanks in advance.