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
429 stars 445 forks source link

Explore disabling InventoryItem #4333

Open awwaiid opened 3 weeks ago

awwaiid commented 3 weeks ago

Summary

When the Event system is fully adopted we'll want to remove InventoryItems altogether. As a step in that direction, for this ticket explore turning InventoryItem writes into a NOP or experimenting with removing it altogether. Then run the tests / interactive in Event mode and see what breaks!

Things to consider

No response

Criteria for Completion

dorner commented 3 weeks ago

Started looking at this... there really isn't a way to do this halfway and validate it. A whole crapload of specs fail because they're testing very specific methods or items that won't exist. Basically the end result of this would be a branch where all reference to inventory items and any method that deals with them are completely expunged.

One thing that tripped me up is that a bunch of specs do storage_location.items, which goes through inventory_items and which fail a lot. :(

cielf commented 2 weeks ago

Hmm. I'm not sure that I've throughly tested the inventory history feature with event sourcing. I expect we'll need to have it only go back to the snapshot date, yes?

dorner commented 2 weeks ago

Yep. We can only show history via events.