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

Issue 401: Cloning modals unresponsive after validation error. #470

Merged
merged 2 commits into from
Dec 8, 2022

Conversation

kaladay
Copy link
Contributor

@kaladay kaladay commented Dec 8, 2022

Description

The problem is that the id is removed from the form before submitting. This is done to trigger the generation of a new ID automatically on the backend. If the validation fails, the form no longer has the ID.

Fix this by saving the ID and restoring the ID to the form if clone submit did not succeed.

This same exact problematic logic is in the ReaderManagementController and the WriterManagementController. Given the identical scope, the same fix is applied to each of those as well.

Fixes #401

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Manual testing using maven, postgresql, and solr local instances.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings

The problem is that the id is removed from the form before submitting.
This is done to trigger the generation of a new ID automatically on the backend.
If the validation fails, the form no longer has the ID.

Fix this by saving the ID and restoring the ID to the form if clone submit did not succeed.
@kaladay kaladay linked an issue Dec 8, 2022 that may be closed by this pull request
This problem also happens in other modals than just the one where the error is reported.
Apply the same solution.

see: 7ae76c7
@coveralls
Copy link

coveralls commented Dec 8, 2022

Coverage Status

Coverage decreased (-0.06%) to 45.21% when pulling 2cedc00 on 2022_dec-401-clone_validation into 5423c43 on 2022_dec-techdebt-staging.

@kaladay kaladay merged commit 7f6af1f into 2022_dec-techdebt-staging Dec 8, 2022
@kaladay kaladay deleted the 2022_dec-401-clone_validation branch December 9, 2022 16:49
@rmathew1011 rmathew1011 mentioned this pull request Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloning modals unresponsive after validation error
3 participants