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.
[x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
[x] Manual testing using maven, postgresql, and solr local instances.
Checklist:
[x] My code follows the style guidelines of this project
Coverage decreased (-0.06%) to 45.21% when pulling 2cedc0095a8d94dd64a4b611edcc55c668d3a8fb on 2022_dec-401-clone_validation into 5423c430dcff294e8750f571c3333cce6522cbf8 on 2022_dec-techdebt-staging.
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 theWriterManagementController
. 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.
How Has This Been Tested?
Checklist: