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

[BUG]: cannot update donations when inventory is below distribution #4508

Open
2 tasks done
jimmyli97 opened this issue Jul 11, 2024 · 3 comments
Open
2 tasks done

[BUG]: cannot update donations when inventory is below distribution #4508

jimmyli97 opened this issue Jul 11, 2024 · 3 comments
Labels

Comments

@jimmyli97
Copy link
Contributor

jimmyli97 commented Jul 11, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Related to #4172

After creating a distribution which decreases the inventory for an item, attempts to update donations which have that item fail with "Error updating donation: Requested items exceed the available inventory", even if the quantity for that item remains the same or increases.

Expected Behavior

It should let you update the donation if the quantity for that item remains the same or increases.

Steps To Reproduce

  1. bin/setup followed by bin/start
  2. In browser, create a distribution at a storage location which decreases the inventory for an item
  3. In browser, attempt to update a donation which contains that item at that storage location

Environment

main commit 524eaa

Criteria for Completion

[] fix
[] write tests

Anything else?

No response

Code of Conduct

  • I've read the Code of Conduct and understand my responsibilities as a member of the Ruby for Good community
@cielf
Copy link
Collaborator

cielf commented Jul 11, 2024

Hey @jimmyli97 If this is what I think it is, it's taken care of by our recent inventory-related changes which are in beta at the moment. If you enable the flipper flag 'read_events", it should take care of it.

@jimmyli97
Copy link
Contributor Author

jimmyli97 commented Jul 11, 2024

Hey @jimmyli97 If this is what I think it is, it's taken care of by our recent inventory-related changes which are in beta at the moment. If you enable the flipper flag 'read_events", it should take care of it.

@cielf yes that fixed it. to turn on that flag I've been adding the flag in seeds.rb, is there another way? I could make a commit to add that and close this issue.

@cielf
Copy link
Collaborator

cielf commented Jul 11, 2024

We're keeping the seed to be what the majority of banks have for ease of support. The way you enable the flag to go to localhost:3000/flipper, userid admin, password password, click on "Add feature", add read_events, click "add_feature", click "fully enable".

@awwaiid awwaiid modified the milestone: Tasks 2024 Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants