I have a filter that I'm trying to update so that it can be used month on month without the need to manually update the dates for start of the month and end of the month.
The aim of the filter is to display client tickets that were tagged with a service level that were created and closed in the previous calendar month.
A search led me to believe I can use "startOfMonth(-1)" and "endOfMonth(-1)" but when I compare the results of this filter with the previous version which used the actual dates i.e. 2025-05-01 & 2025-05-31, I get 1 additional work item. When I look at this work item, it should not be included in the filter.
Original filter query:
project not in ("PROJECT 1", PROJECT 2, "PROJECT 3", "Internal QA") and statusCategory in (Done) AND "Service Level" in ("Level 1", "Level 2", "Level 3", "Level 4") AND resolved >= 2025-05-01 AND created <= 2025-05-31
Results = 86
Updated filter query:
project not in ("PROJECT 1", PROJECT 2, "PROJECT 3", "Internal QA") and statusCategory in (Done) AND "Service Level" in ("Level 1", "Level 2", "Level 3", "Level 4") AND resolved >= startOfMonth(-1) AND created <= endOfMonth(-1)
Results = 87
The 1 additional work item was created on 31 May 2025 & resolved on 3 June 2025 so should not be included in this filter.
Is this a bug or am I misunderstanding the use of the startofmonth / endofmonth option?
Is there a better way to do this?
Thanks!