-
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
Fix missing variables mapping in objects api registration (v2) #5150
Open
robinmolen
wants to merge
5
commits into
master
Choose a base branch
from
bug/5031-missing-variables-mapping-in-objects-api-registration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix missing variables mapping in objects api registration (v2) #5150
robinmolen
wants to merge
5
commits into
master
from
bug/5031-missing-variables-mapping-in-objects-api-registration
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5150 +/- ##
=======================================
Coverage 96.74% 96.74%
=======================================
Files 779 779
Lines 26774 26781 +7
Branches 3483 3486 +3
=======================================
+ Hits 25903 25910 +7
Misses 607 607
Partials 264 264 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sergei-maertens
requested changes
Mar 12, 2025
b9561ea
to
aa57a72
Compare
sergei-maertens
approved these changes
Mar 12, 2025
…bjects API registrations Due to a previously missing default value, some (older) Objects API registrations might not have `variables_mapping` in their `options` configuration. This causes issues when trying to configure variables to the Objects API, resulting in javascript errors. This script ensures that all Objects API V2 registrations have, at least, an empty array as `options` `variables_mapping`.
Any form with an Objects API registration V2 (the variable mapping), that doesn't have `variables_mapping` in the `options` config, will have its `variables_mapping` set to empty array. Due to a previously missing default value in the Objects API registration, the `options` value `variables_mapping` could be missing. If missing, this would cause javascript errors in during the variable mapping in the admin.
…_mapping options When importing a form with an Objects API registration, that doesn't have a version, the version is set to 2. And based on the version of the Objects API registration, a default value for `variables_mapping` is set.
aa57a72
to
111fd8f
Compare
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 #5031
Changes
The bug was already fixed by a previous PR (#5021). This PR adds a detection and a fix script, so that we can monitor and fix affected form registration backends.
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