human-essentials
human-essentials copied to clipboard
fix: individuals request preserve values
Fixes #4135
When individuals requests were submitted with incorrect values the error page did not preserve correct or incorrect inputs.
This was happening because the controller created a new request on error. Now the new request will be populated with the items from the failed request.
Notes
I attempted to reuse the failed request, however, that was not possible.
The form expects a FamilyRequest
. The service object that deals with the request does not create a FamilyRequest
, instead it reuses the family request service which does not store or create a FamilyRequest
. The other option would be do a large refactoring and add additional objects such as an IndividualRequest
and IndividaulRequestService
.
That might be something worth doing, I chose not to just to get this bug fixed.
Type of change
- Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
System Tests