rubyforgood / human-essentials

Human Essentials is an inventory management system for diaper, incontinence, and period-supply banks. It supports them in distributing to partners, tracking inventory, and reporting stats and analytics.
https://humanessentials.app
MIT License
436 stars 450 forks source link

Bug: Inventory levels by date with read_events enabled doesn't work before snapshot #4433

Open cielf opened 2 weeks ago

cielf commented 2 weeks ago

Summary

The inventory levels by date does not work properly if read_events is enabled

Why fix

continuity of service

Details

Note: we can only really see the problem on a copy of prod -- I recommend this be core team issue for that reason

what we want

When using event sourcing (i.e. for now, when read_events is enabled) If the date chosen is before the snapshot, use the inventory level version at the date else use the event sourcing way of calculating the inventory levels at the date

Criteria for completion