-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Fix behaviour with errors on Distribution #4613
Comments
I would like to take it |
Please do! |
Hey, I would like suggestions from a developer on this.
This is the function where we can handle multiple errors of Inventory Error if raised if something regarding quantity goes wrong
this is where the raise error is caught. As per the issues I thought of collecting all the error through a rescue block the combining the messages and throwing standard Error. But doing that so may bring more error as few of the events are utilizing the attributes of Inventory Error to validate and raise the error. This may take more changes or bring out more issues. May be I am over thinking can anyone suggest if It can be dont in a more easy way. Thank You @cielf @ |
I think rescuing those errors per event in |
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. |
I think this might be fixed by a PR that is currently in flight #4797 |
The item quantities disappearing should be fixed by PR #4797, but not the distribution error behavior. That part is due to the way we are currently handling inventory events. We attempt to perform the distribution on the inventory aggregate, but if an error is raised we abort and return the error rather than continuing and returning all the errors/problems with the distribution. |
Right. |
I am trying to work on this issue. |
I just ran through a case of editing a donation and changing the storage location on staging (which has the main branch on it) The numbers went down in the original and up in the new location as expected. So, more details, please? |
I observed an issue with the location storage yesterday, where the source item's quantities were doubled. However, after updating the source code and setting it up again today, it appears to be working correctly now. |
What error message format do you want? It currently looks like following:
|
|
@dorner -- could you weigh in on that? |
I'd rather change |
|
I checked on staging, and the sequence of new donation, then change the location is working as expected -- in that location 2's level of the item is original level + amount of donation, and location 1 has the original level at the end. So main looks right to me. Was this situation before you made any changes? |
Oh, sorry. It turns out the code I copied to create a function was not exactly the same as the other part. It's fine now. Sorry for wasting your time. |
Summary
If you have an error (too many of an item) on saving a new distribution, the number of items in inventory for each item is disappearing, and only one error is showing even if you have multiple overages. Fix it!
Why?
Speed up process of dealing with errors. Give enough information for banks to fix all the errors in one go.
Details
To recreate this issue:
sign in as [email protected]
Requests
View a request
Click Fulfill
enter a distribution that has two items that have a quantity that is more than is in the inventory for your chosen storage location.
Save.
You should see errors for both items (you'lll only see one)
The number in brackets after the item (which is the inventory level for that item/storage location) has disappeared -- it should still be there.
Criteria for completion
The text was updated successfully, but these errors were encountered: