-
Notifications
You must be signed in to change notification settings - Fork 27
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
[#5124] Hidden/disabled prefill fields trigger validation #5135
base: master
Are you sure you want to change the base?
[#5124] Hidden/disabled prefill fields trigger validation #5135
Conversation
When a component (or its parent is disabled and hidden, the validation in the backend is triggered since there is no data for the specific key. This means, for our validator, that the data has been changed and raises an error.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5135 +/- ##
==========================================
- Coverage 96.75% 96.74% -0.01%
==========================================
Files 777 779 +2
Lines 26724 26776 +52
Branches 3474 3484 +10
==========================================
+ Hits 25856 25905 +49
- Misses 606 607 +1
- Partials 262 264 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Just a failing end-to-end test, but probably flakiness by the looks of it :) |
Yes, I remember this failing in master as well. I re-run the CI one more time to see if this is the case. |
This ensures that if a field is prefilled but not hidden and the data is omitted from the submission data, the initial prefill data is persisted in the database. So, if a user clears a prefilled field that is read-only we make sure that this will not affect the real value of the variable.
Closes #5124
Changes
When a component (or its parent is disabled and hidden, the validation in the backend is triggered since there is no data for the specific key. This means, for our validator, that the data has been changed and raises an error.
Additional test for the case someone omits the submission data (affects the prefill data).
Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Dockerfile/scripts
./bin
folderCommit hygiene