Skip to content

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

Open

Description

@ruestitch

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

Activity

  1. eugeniojimenes commented on Jun 24, 2026

    @eugeniojimenes
    Contributor

    Hi! I'd like to work on this. Is there any other details beyond these steps to reproduce this error locally?

  2. augustocbx commented on Jun 24, 2026

    @augustocbx
    Contributor

    I've investigated this and have a fix ready (the "Add Another Item" template was rendering the whole item list instead of a single blank row after a failed submission). @eugeniojimenes, are you already working on it? If not, I'm happy to open a PR — could a maintainer assign this to me?

  3. eugeniojimenes commented on Jun 24, 2026

    @eugeniojimenes
    Contributor

    Go ahead @augustocbx. I'll try to get another issue.

  4. github-actions commented on Jul 27, 2026

    @github-actions
    Contributor

    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.

  5. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    Automatically unassigned after 7 days of inactivity.

  6. geographybuff commented on Oct 8, 2026

    @geographybuff
    Contributor

    Draft PR #5743 fixes this. The cause is that object: was passed outside locals: in partners/requests/new.html.erb, so the partial rendered every submitted row into the "Add Another Item" template. Could this issue be assigned to me (@geographybuff)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions