I am using the JIRA API for this reporting exercise.
Where oh where is the flaw in my logic???? I have simplified the queries just to work with all tickets, no label filtering etc. And still the counts don’t add up. What exists at the beginning of the week, plus what was created, minus what was resolved should equal what exists at the end of the week.
So here’s an example of how I’m pulling counts for previous weeks. I’ve taken out all of the labels and statuses, just to get all tickets no matter what.
Existing at start of week: Project in (myproject) AND created < startOfWeek(-4w) AND resolved > startOfWeek(-4): 55
----- Gets items which were created before the beginning of the week in question, and were resolved after the beginning of the week in question. So what exists at the beginning of the week.
Created during the week: Project in (myproject) AND created > startOfWeek(-4w) AND created < endOfWeek(-4w): 28
----- Gets items which were created after the start of the week in question, and were created before the end of the week in question. So what was created in the week.
Resolved during the week: Project in (myproject) AND resolved > startOfWeek(-4) AND resolved < endOfWeek(-4w): 17
----- Gets items which were resolved after the start of the week and were resolved before the end of the week. So what was resolved in the week.
Existing at the end of the week: Project in (myproject) AND created < endOfWeek(-4w) AND resolved > endOfWeek(-4w): 55
----- Gets items which were created prior to the end of the week in question, and were resolved after the week in question. So what exists at the end of the week