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

[BUG] On Donation, drop down changes to show item number rather than description on edit error. It shouldn't.

Open cielf opened this issue 11 months ago • 7 comments

Summary

If you have a validation error on saving the donation, the dropdownfor the item changes to a number rather than the item name. It should still show the item name.

Details

Recreation

I've been able to recreate this by producing an error where you can't reduce the quantity because it would take the inventory negative.
To do that: Enter a donation with a large number of some item. Next, enter a distribution that reduces the inventory to less than the number of items in the donation Then, edit the donation. Reduce the number of items in the donation to 1. (this doesn't have to realistic, we're just trying to produce the error.) Save. You should get an error, and a screen similar to this (the numbers will obviously be different)

Screenshot 2024-02-25 at 8 40 16 AM

Instead, you should be seeing the item name where it shows "1" in the above screenshot.

Criteria for completion

  • [ ] The item name dropdown is still there after the error.
  • [ ] tests to demonstrate.

cielf avatar Mar 10 '24 14:03 cielf

Hey there @cielf I would love to try and solve this

ZahBenjamin avatar Mar 11 '24 15:03 ZahBenjamin

Give it a go!

dorner avatar Mar 11 '24 15:03 dorner

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 Apr 11 '24 00:04 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Apr 19 '24 00:04 github-actions[bot]

Can I take a swing at this?

jimmyli97 avatar Jun 20 '24 19:06 jimmyli97

You may!

dorner avatar Jun 20 '24 20:06 dorner

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Jun 28 '24 00:06 github-actions[bot]