human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Add inactive storage locations and items to the seed

Open cielf opened this issue 1 year ago • 5 comments

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.

cielf avatar Jul 14 '24 15:07 cielf

I would like to tackle this one!

aman5438 avatar Jul 30 '24 08:07 aman5438

It's yours!

cielf avatar Jul 30 '24 11:07 cielf

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.

aman5438 avatar Aug 27 '24 15:08 aman5438

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?

cielf avatar Aug 27 '24 17:08 cielf

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.

aman5438 avatar Aug 28 '24 06:08 aman5438

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.

github-actions[bot] avatar Sep 28 '24 00:09 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Oct 05 '24 00:10 github-actions[bot]

@cielf please assign this to me

lit-poks avatar Oct 08 '24 07:10 lit-poks

Done! Thank you.

cielf avatar Oct 08 '24 11:10 cielf

@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?

lit-poks avatar Oct 08 '24 14:10 lit-poks

I think that will do. Thanks.

cielf avatar Oct 09 '24 14:10 cielf

@cielf please review #4713

lit-poks avatar Oct 09 '24 16:10 lit-poks