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

When submitting project scope lists with a duplicate name, the form generates form validation errors for the duplicate and all subsequent scope lists #529

Closed
mynoc96 opened this issue Sep 27, 2024 · 1 comment · Fixed by #530
Assignees
Labels
bug Something isn't working

Comments

@mynoc96
Copy link

mynoc96 commented Sep 27, 2024

Describe the bug

When submitting project scope lists with a duplicate name, the form generates form validation errors for the duplicate and all subsequent scope lists

To Reproduce

  1. Go to a project scope list
  2. Add scope lists: A, B, C, and D with scope list contents of X
  3. Submit it.
  4. You shouldn't see an error.
  5. Rename B to A and submit.
  6. You should see form validation errors for B, C, and D.

Expected Behavior

Only B should display a form validation error.

Server Specs:

  • OS: WSL Ubuntu 22.04 LTS
  • Docker 24.0.7
  • Ghostwriter 4.3.0

Additional context

I realize this is a nit-picky bug report, but figured I'd bring it up and you can triage as you see fit.

@mynoc96 mynoc96 added the bug Something isn't working label Sep 27, 2024
@chrismaddalena
Copy link
Collaborator

This comes from how we check for duplicate names. Once we encounter a duplicate, we set a flag and add a validation error to the field. That causes a validation error to be added to each subsequent name field if there are any. It should still work as intended and not do this if we unset the flag after adding the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants