JQL relative date queries yield identical findings. For example:
project="demoProj" AND createdDate >= -3d AND createdDate < -2d
How can I limit results to one single day?
JQL relative date queries yield identical findings. For example:
project="demoProj" AND createdDate >= -3d AND createdDate < -2d
How can I limit results to one single day?
In my experience, I’ve found that the best approach is to set clear time boundaries rather than relying solely on relative date expressions. For example, if you’re targeting a specific day, starting from the beginning of the day until, but not including, the start of the next day works reliably. I once implemented this by formulating a query using explicit date and time settings, ensuring that the results were limited strictly to that day’s issues. This method minimizes the risk of overlapping time intervals due to timezone discrepancies or daylight saving changes.
I’ve encountered similar issues where relative date queries don’t provide the precision required for pinpointing a specific day. A solution that has worked for me is constructing the query with absolute dates and exact time boundaries. This method provides more clarity by explicitly defining the start and end of a day, and it helps alleviate discrepancies due to varying time zones or system defaults. Even though it requires updating the query with specific dates, this approach reliably captures all records for that day without the risk of overlapping into adjacent periods.
i reckon another trick is using startOfDay() & endOfDay() functions if supported. exmp: createdDate >= startOfDay(-3) and createdDate <= endOfDay(-3) to pinpoint that day. helps avoid manual date setting and messy timezones issues.
Based on my experience, while relative date queries are convenient for many use cases, they can sometimes yield unexpected results when precision is critical. In one project, I solved the issue by transforming the relative query into one that defined explicit time ranges for the day, which worked well even when handling timezone inconsistencies. Instead of solely relying on relative time expressions, I began by calculating the exact start and end of the target day in my application’s preferred timezone and then constructing the JQL query accordingly. This method provided a reliable means to filter issues accurately for one specific day.