Add inactive storage locations and items to the seed
Summary
Add inactive storage locations and items to the seed
Why?
Better data for when we are investigating problems and demontrating features to the stakeholders
Details
An inactive storage location may have items associated with it, but the level of those items will be zero.
An inactive item will have no current inventory.
Criteria
- [ ] at least 1 inactive storage location exists in the seed
- [ ] at least 1 inactive item exists in the seed.
I would like to tackle this one!
It's yours!
Hello @cielf , Apologies for the delay in progress due to a medical emergency. I would appreciate it if you could clarify further on how we can create a storage location as inactive. I'm a bit confused about this. Thank you for your understanding.
That's a good question. I looked at the code that is called when we press the "deactivate" button on a storage location. From storage_location_deactivate_service.rb, it appears that we call discard! on the storage location to deactivate it.
So, create the storage location and then discard! it?
Thank you for the clarification. I understand now. So, after creating a storage location, I would just need to call discard! on it to set it as inactive. I’ll go ahead and implement this approach.
This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.
Automatically unassigned after 7 days of inactivity.
@cielf please assign this to me
Done! Thank you.
@cielf , by at least 1 inactive item exists in the seed you mean that an item of an organization right? just confirming
if so while creating inventory_items for storage location, should it only include active items of an organization?
I think that will do. Thanks.
@cielf please review #4713