-
-
Notifications
You must be signed in to change notification settings - Fork 568
Add Inventory Flow tab with quantity tracking and date filtering #5313
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
base: main
Are you sure you want to change the base?
Add Inventory Flow tab with quantity tracking and date filtering #5313
Conversation
notes for my functional testing (which won't be until at least tomorrow): beyond basic checks, check what happens if we try to go back before the first snapshot. Are we already constraining this / should we be and how are we communicating that otherwise. (this may require using prod data to test well) (Note: thinking about it - if we base this on eventables (which is probably the best bet ) we should constrain it to start no earlier than the first snapshot) |
@AlexeyKasianenko Thank you for this! I'm going to add things I notice here on-the-go while I test. I'm not looking at the code, just trying out the functionality. |
1/ First thing is that I'm afraid the performance is slow. I'm checking it with the production data for one of active bank. Using the production branch, the storage location view comes up in 4 seconds, on your current branch it takes 89 seconds. |
2/ You're showing items that aren't on the inventory in / out tabs (again, this is testing with production data). I'm about 90% sure that they don't show inactive items, if so you should do the same. |
3/ If I update the date range and click "filter", it's going back to the first tab. This is potentially confusion/annoying for our users. Let's have it stay on the same tab. |
4/ The current "all time" is not working properly (with all time, in plus out should equal inventory on the first page) with production data. However, I want to check with the senior team about whether we should just constrain the date range-- i suspect that's going to make sense. |
5/ When I did a "this year" in the date range, and filtered (with production data), when I returned to the page there was only one item. I know there are more. I'll try to recreate that with the seed data. (Edit: no immediate luck -- I'll need to poke further on this one) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @AlexeyKasianenko -- I'm at the end of working on this for today. Could you look at points 1, 2, and 3 above, please. I'll confirm number 4 with the senior team on Sunday, and number 5 is going to take some digging to figure out -- I'll probably wait and try to recreate it with production data once you've addressed 1, 2, and 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! This was a good first run at this, but unfortunately we need a different approach. The idea here is to base this off of Events instead of Items. Events form our improved transactional log, and we'd be able to get the per-storage-location Events to accurately capture the quantity ins and outs for an item over a period of time.
You MIGHT be able to update the queries you built to be Event centric, still joining off of Items to group them. Then you pass in the time range filter and limit to increases or decreases in the quantity depending on which column you're populating.
That also means, as an aside, that we want to hard-wire in a start-date for the filter to 2024-09-01, by which time every organization was using Events to track inventory changes.
Let me know if this makes sense and if you're up for it!
@awwaiid I would counter that we want to hard-wire that the start date can be no earlier than 2024-09-01. I, for one, don't want to have to work more than a full year of data if I'm checking into something that happened 2 weeks ago. |
8e2ab73
to
0da6387
Compare
0da6387
to
d5c4aed
Compare
Hmmm. ![]() I then went to the Inventory Flow tab, and selected the date range "Today". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @AlexeyKasianenko -- Thank you -- I'm going to hold off on any further functional testing until the above is addressed, as I expect its fix will impact anything else I would try.
I looked very briefly at the code, and didn't see any reference to Events. Did you make that change as well?
c761f96
to
5233723
Compare
Hey @cielf. Fixed that |
…curate item creation timestamps
Resolves #5249
Description
Quantity in has donations, purchases, adjustments that increase the inventory.
Quantity out has distributions and adjustments that decrease the inventory
Kit allocations result in quantity in for the kit, and quantity out for the components
See the current Inventory In and Inventory Out tabs for details
Change is Quantity In minus Quantity Out. Negatives are presented in red.
Include anything else we should know about. -->
Type of change
How Has This Been Tested?
go to /storage_locations page
Screenshots