rubyforgood / rubyforgood/human-essentials

Partner Request Add Another Item auto-populates with first item when returning from failed validation

Open
#5,611 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Difficulty—Intermediate stale
Dominant language
Ruby
Stars
593
Forks
593
Avg merge
4d 22h
Merged PRs (30d)
41

Description

Initial state:

Org with request units (e.g., the default units + pallets) for ItemA
Logged in as verified partner

Steps:

  1. Click Create Request (under the Quantity category)
  2. Enter 3 and pallets for ItemA
  3. Click Add Another Item
  4. Enter 5 and units for ItemA
  5. Click Submit Essentials Request (this will be rejected since we don't support mixing units for an item in a single request)
  6. Click Add Another Item

What I see:
The newly added item is populated with the data from the first entry in the list (3 pallets of ItemA)

What I expect to see:
No item selected from dropdown and no quantity entered on the newly added item

Image Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the flow from Create Request under the Quantity category, including the failed mixed-unit submission and the second Add Another Item action. Inspect the request form's item-addition and validation-return behavior; done means a newly added item has an empty item dropdown and quantity after validation fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
rails, ruby
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.