Generally speaking, Jira has a powerful and flexible search engine that enables locating exactly the issues that we want to see. However, issue searches don't always return the expected results.
ISSUES CREATED APRIL - JUNE
Let's say we want to see all issues created in Jira during the months of April, May, and June. So, we search for issues created between April 1st and June 30th. The search properly returns all issues created between those two dates.
ISSUES FOR EACH MONTH
Then, to see the numbers for each month, we run separate searches using the following date ranges:
- April 1 - April 30th
- May 1 - May 31st
- June 1 - June 30th
One might expect to see all issues created during each of the months of April, May, and June.
However, using the date ranges listed above, we don't see all of the issues.
WHY THE DISCREPANCY?
The search “April 1 to April 30th” actually does not include the issues created ON April 30th - only BEFORE April 30th. The search for April includes all issues created on April 1 and through the 29th, but doesn’t include the 30th. To see all issues created in April, we have to extend the date range to May 1st.
Modify the basic search criteria for April to be April 1 to May 1 (this will include all of the month of April, but none of May).
TAKING IT TO THE NEXT LEVEL: Save and Reuse the Search
The above workaround is great for ad hoc searches, but what if we want to reuse the search without needing to change the criteria each month? For example, let’s say we want to see all issues created last month, without specifying a date range?
One way to do this is with the startOfMonth() function. Use the advanced search using JQL to do this.
LAST MONTH'S ISSUES
Add this JQL filter to see last month’s created issues:
created > startOfMonth(-2) AND created < startOfMonth(-1) ORDER BY created ASC
ISSUES FROM 2 MONTHS AGO
To go back one month further, simply change the "-2" to "-3" and the "-1" TO "-2".
created > startOfMonth(-3) AND created < startOfMonth(-2) ORDER BY created ASC