Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFG 2023] Add low inventory report to dashboard #3742

Closed
2 tasks
cielf opened this issue Jul 16, 2023 · 23 comments
Closed
2 tasks

[RFG 2023] Add low inventory report to dashboard #3742

cielf opened this issue Jul 16, 2023 · 23 comments
Assignees
Labels
Ruby for Good 2023 DC Created for Ruby for Good 2023 DC

Comments

@cielf
Copy link
Collaborator

cielf commented Jul 16, 2023

Summary

Add a low inventory report to the dashboard

Why

Allow banks to see at a glance which items they need to get more of or risk not being able to fulfill requests

Details

There will be a new card on the dashboard, titled "Bank-wide Low inventory". It should be after the announcements.

It will show the items that are at or below the greater of minimum and recommended quantity at each storage location across the bank (some banks have given minimum but not recommended quantities)

It will have the following columns

  • storage location
  • item name
  • quantity
  • minimum quantity
  • recommended quantity

If there are no items that are low, the card can just say "Inventory is at recommended levels (minimum and recommended levels can be set on each item)"

Initial sort: I suggest alpha by item within storage location.

Hopefully there won't be so many that the sort will really be an issue!

Other things you should know

We are grouping a number of dashboard-related changes together and will merge these individual changes into a long lived dashboard-related branch. We will merge this long lived branch into main when we are ready to release the whole suite.

Criteria for completion

  • Report available on dashboard
  • automated tests

Bonus round

  • add in a column (before item name) with a visual indicator (like a red "!"? ) if the quantity is below the minimum quantity.
@cielf cielf added the Ruby for Good 2023 DC Created for Ruby for Good 2023 DC label Jul 16, 2023
@cielf
Copy link
Collaborator Author

cielf commented Jul 29, 2023

I realized overnight that, as written, this will not be useful for Sylvia's Sisters. We would need to add a "include in low inventory report" flag on the storage location (and they'll need to add the recommended levels, of course).

@ChaelCodes
Copy link
Contributor

Right now, it looks like we're configuring "minimum quantity" at the item level, which means that we're assuming all banks should have the same distribution and quantities at every location.

We know this doesn't work for Sylvia's Sisters, but I think it's also an issue for organizations with banks that support different communities. Each community would have a population that needs different items.

I want to propose a change. Could we add a minimum_quantity and recommended_quantity to InventoryItem? We could then use this value to allow banks to set location-specific quantity guidelines.

Sylvia's Sisters could set the minimum_quantity for all their residential locations to 0, but they could also distribute more disposable products to Virginia, and more reusable products to Uganda.

I have an idea for what the roll-out for this could look like, and how to transition minimum_quantity on item to a global value for an item, instead of a per-bank quantity.

@cielf
Copy link
Collaborator Author

cielf commented Jul 29, 2023

(I missed the first part of SS's stuff, didn't know they were doing Uganda)

@cielf
Copy link
Collaborator Author

cielf commented Jul 29, 2023

What I think I saw with the SS model is they wouldn't ever be concerned about their residential "storage locations" having low inventory. Ever. Because they aren't really storage locations, they are workstations with materials.

@cielf
Copy link
Collaborator Author

cielf commented Jul 29, 2023

I understand what you're saying about banks with different communities -- we have other banks that essentially have different branches, and those branches are being represented as storage locations.

@cielf
Copy link
Collaborator Author

cielf commented Jul 29, 2023

(Thinking 'aloud' -- apologize in advance for the blathery nature of this) I'm not (yet?) sure that InventoryItem is the right place for this -- I mean, logically it is -- but an InventoryItem only comes into being when Inventory is added to the storage location (until a very short time ago it also disappeared when it was taken down to 0) So there's some flow issues there. I'm a bit concerned about the extra input work, too, for those banks with a lot of storage locations. We'd need to add a whole slice for InventoryItems, right? Though for those banks that have already put recommended levels in, we could do a reasonably smooth default migration.

@cielf
Copy link
Collaborator Author

cielf commented Jul 29, 2023

I'm a bit confused by this part of your comment: "and how to transition minimum_quantity on item to a global value for an item, instead of a per-bank quantity." -- minimum_quantity is never going to be at higher than a bank level. Was that a mis-speak, or am I just not getting it?

@cielf
Copy link
Collaborator Author

cielf commented Jul 29, 2023

Would be happy to pop onto a Zoom to discuss in the am. Would love to hear your ideas for a relatively painless transition .

@cielf
Copy link
Collaborator Author

cielf commented Jul 30, 2023

(Hmmm... what is the reason we don't add InventoryItems until inventory is added to the storage location? Was there a business reason or was it an accident)

@ChaelCodes
Copy link
Contributor

ChaelCodes commented Jul 30, 2023

Transition idea -

  • New Columns are added to InventoryItem
    • New columns default to 0
  • If an item has a minimum quantity, and a storage location has a warehouse type of 'Consumer, self-storage or container space', 'Commercial/office/business space that contains storage space', or 'Warehouse with loading bay', we should populate minimum_quantity on the InventoryItem.
    • This can be a rake task that accepts an organization as a parameter, so if we want to update an indivdual bank in the future, we can.
  • Start displaying/editing this minimum_quantity in reports, forms, and dashboards
  • Start removing the item level minimum_quantity from reports and dashboards
  • Reintroduce the item level minimum_quantity as a bank-level global quantity to check against

It'll be slow, but that'll give people time to adapt and change.

@ChaelCodes
Copy link
Contributor

(Thinking 'aloud' -- apologize in advance for the blathery nature of this) I'm not (yet?) sure that InventoryItem is the right place for this -- I mean, logically it is -- but an InventoryItem only comes into being when Inventory is added to the storage location (until a very short time ago it also disappeared when it was taken down to 0) So there's some flow issues there. I'm a bit concerned about the extra input work, too, for those banks with a lot of storage locations. We'd need to add a whole slice for InventoryItems, right? Though for those banks that have already put recommended levels in, we could do a reasonably smooth default migration.

(Hmmm... what is the reason we don't add InventoryItems until inventory is added to the storage location? Was there a business reason or was it an accident)

I'm okay with it living somewhere other than InventoryItem. I'm looking for a relationship between Item and StorageLocation, and I think this is a good place for it, but if we want to introduce a separate join table, I'm open to that.

I'm a bit confused by this part of your comment: "and how to transition minimum_quantity on item to a global value for an item, instead of a per-bank per-location quantity." -- minimum_quantity is never going to be at higher than a bank level. Was that a mis-speak, or am I just not getting it?

You're right. I was thinking of locations as bank branches and misspoke.

@cielf
Copy link
Collaborator Author

cielf commented Jul 30, 2023

I do think we might want to introduce a separate table -- but only because I'm not positive if there are business reasons for the current InventoryItem behaviour.

@cielf
Copy link
Collaborator Author

cielf commented Jul 30, 2023

So, we're thinking in terms of initially doing the report using the levels on Item (pretty sure S'sS doesn't use the recommended levels yet) , then?

@cielf
Copy link
Collaborator Author

cielf commented Jul 30, 2023

I'm thinking maybe we hide the report unless they have entered any recommended levels or non-zero minumums.

@cielf
Copy link
Collaborator Author

cielf commented Jul 30, 2023

Re transition: I think we'd want to do some research on the patterns over all the banks -- Sylvia's Sisters might be a special case in how they are using the residential.

@cielf
Copy link
Collaborator Author

cielf commented Jul 30, 2023

And I think we should populate both minimum and recommended from the Item levels (I expect you meant that, but being explicit)

@cielf
Copy link
Collaborator Author

cielf commented Aug 5, 2023

Hey @ChaelCodes -- just checking if there's anything blocking the initial version of this [I have been assuming we're doing an initial version that uses the item-level minimum and recommended values, then we work on making it better.] ?

@ChaelCodes
Copy link
Contributor

Hey @ChaelCodes -- just checking if there's anything blocking the initial version of this [I have been assuming we're doing an initial version that uses the item-level minimum and recommended values, then we work on making it better.] ?

Nope! Nothing blocking it. Just haven't had a chance to pick it up since the RFG event. I worked on removing Donation (All Sources), and the Experimental Docker one still needs the Org spec fixed.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2023

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
Copy link
Contributor

Automatically unassigned after 7 days of inactivity.

@ChaelCodes
Copy link
Contributor

That initial PR to add the low inventory report is ready for review: #3857

@awwaiid awwaiid added this to the Dashboard Update milestone Nov 12, 2023
@cielf
Copy link
Collaborator Author

cielf commented Jan 8, 2024

Formally assigning @awwaiid because I know Brock's doing a last push to get all the dashboard items in place.

@github-actions github-actions bot removed the stale label Jan 9, 2024
@awwaiid
Copy link
Collaborator

awwaiid commented Jan 13, 2024

This is merged into dashboard and I manually validated it in addition to the specs. Further changes can be in separate issues and part of the unified dashboard validation.

@awwaiid awwaiid closed this as completed Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ruby for Good 2023 DC Created for Ruby for Good 2023 DC
Projects
None yet
Development

No branches or pull requests

3 participants