-
Notifications
You must be signed in to change notification settings - Fork 26
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
Bug/4727 crashing form after changing user variable to array #4797
Merged
sergei-maertens
merged 2 commits into
master
from
bug/4727-crashing-form-after-changing-user-variable-to-array
Nov 8, 2024
Merged
Bug/4727 crashing form after changing user variable to array #4797
sergei-maertens
merged 2 commits into
master
from
bug/4727-crashing-form-after-changing-user-variable-to-array
Nov 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
robinmolen
force-pushed
the
bug/4727-crashing-form-after-changing-user-variable-to-array
branch
from
October 28, 2024 13:42
0d09286
to
b723424
Compare
robinmolen
added
the
needs-backport
Fix must be backported to stable release branch
label
Oct 28, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4797 +/- ##
=======================================
Coverage 96.55% 96.55%
=======================================
Files 748 748
Lines 25413 25413
Branches 3358 3358
=======================================
Hits 24538 24538
Misses 610 610
Partials 265 265 ☔ View full report in Codecov by Sentry. |
robinmolen
force-pushed
the
bug/4727-crashing-form-after-changing-user-variable-to-array
branch
from
October 28, 2024 14:23
b723424
to
4e29c3a
Compare
robinmolen
force-pushed
the
bug/4727-crashing-form-after-changing-user-variable-to-array
branch
from
October 29, 2024 08:53
4e29c3a
to
037c4a1
Compare
src/openforms/js/components/admin/form_design/form-creation-form.js
Outdated
Show resolved
Hide resolved
robinmolen
force-pushed
the
bug/4727-crashing-form-after-changing-user-variable-to-array
branch
from
November 7, 2024 14:53
037c4a1
to
790d461
Compare
sergei-maertens
force-pushed
the
bug/4727-crashing-form-after-changing-user-variable-to-array
branch
from
November 8, 2024 15:35
790d461
to
1352126
Compare
sergei-maertens
approved these changes
Nov 8, 2024
sergei-maertens
deleted the
bug/4727-crashing-form-after-changing-user-variable-to-array
branch
November 8, 2024 16:26
sergei-maertens
pushed a commit
that referenced
this pull request
Nov 8, 2024
sergei-maertens
pushed a commit
that referenced
this pull request
Nov 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #4727
Changes
Fixes the crashes on user variable dataType change, when a initialValue is defined. This crash happend when changing any dataType to the array dataType, because the component for the array dataType used the
.some
js array function. (It expected that the value was an array, so this function was used without any checks)To resolve this situation, and possible similar situations in the future, the initialValue now gets transformed when the dataType changes. This transformation could result into losing the previous initialValue. To make sure that the dataType change is intentional, a confirmation message will be shown.
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
Commit hygiene