Fix: Summary counters show zero for “Last Hour” when requests are recent in AI Request Logs#671
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @alexWinterjuice. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #671 +/- ##
==========================================
Coverage 74.68% 74.68%
Complexity 1754 1754
==========================================
Files 85 85
Lines 7549 7549
==========================================
Hits 5638 5638
Misses 1911 1911
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What?
Closes #666
Why?
On AI Request Logs, the header time-period dropdown correctly filters the log table for short windows. Still, the summary cards at the top show 0 when “Last Hour” is selected, even when requests were made within the last hour.
How?
Replace NOW() with UTC_TIMESTAMP() in all get_date_condition() cases so the period cutoff aligns with the stored GMT timestamps.
Testing Instructions
Screenshots or screencast
Changelog Entry