Fix: refunds missing from the daily sales report
SampleDoneRefunds made after midnight were counted on the wrong day. Fixed, tried on Test and merged.
5 of 5 steps
Report
Cause: the report grouped sales by the server's day, which runs on UTC, so a refund made after midnight in the store counted on the day before.
Fix: refunds are counted in the store's own time zone, and a new test makes a refund at 00:30 store time and checks the day it lands on.
| Check | Result |
|---|---|
| All tests | Passed |
| A refund after midnight on Test | On the right day |
| Production after the merge | Updated |
Steps
-
Find the cause in Production's logsDone
-
Write a test that fails without the fixDone
-
Count refunds in the store's own time zoneDone
-
Try it on the Test environmentYouDone
-
Merge it and publish a new versionDone
Keep in mind
Done
Production runs the fix. The test keeps the bug from coming back.
Links
Activity
- Merged and published. Production is updated.
- Merge it into main and publish a new version? That updates Production. Yes
- Done: Try it on the Test environment
- On Test now. Try a refund after midnight.
- Found it: the report used the server's time zone, not the store's.