Skip to content
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

🐛 [#4772] Add migration to set select dataType to string #4818

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

stevenbal
Copy link
Contributor

@stevenbal stevenbal commented Nov 11, 2024

because Select components did not have a dataType set, formio tries to cast it to other types if possible, which causes issues when submitting the data to the backend. For that reason we set the value to string to avoid this unwanted normalization

TODO:

Closes #4772

Changes

[Describe the changes here]

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Problem detection in the admin email digest is handled
  • Release management

    • I have labelled the PR as "needs-backport" accordingly
  • I have updated the translations assets (you do NOT need to provide translations)

    • Ran ./bin/makemessages_js.sh
    • Ran ./bin/compilemessages_js.sh
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how

@stevenbal stevenbal marked this pull request as draft November 11, 2024 12:04
@stevenbal stevenbal added the needs-backport Fix must be backported to stable release branch label Nov 11, 2024
Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.55%. Comparing base (b5daa22) to head (0fe69b3).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4818   +/-   ##
=======================================
  Coverage   96.55%   96.55%           
=======================================
  Files         748      748           
  Lines       25417    25423    +6     
  Branches     3361     3362    +1     
=======================================
+ Hits        24542    24548    +6     
  Misses        610      610           
  Partials      265      265           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stevenbal stevenbal force-pushed the issue/4772-select-component-int-values branch from 5ca8dbf to 2fe270b Compare November 12, 2024 08:24
because Select components did not have a dataType set, formio tries to cast it to other types if possible, which causes issues when submitting the data to the backend. For that reason we set the value to string to avoid this unwanted normalization
@stevenbal stevenbal force-pushed the issue/4772-select-component-int-values branch from 2fe270b to 0fe69b3 Compare November 12, 2024 10:49
@stevenbal stevenbal marked this pull request as ready for review November 12, 2024 11:29
@sergei-maertens
Copy link
Member

Not backporting this PR, instead we'll backport the fix via the SDK

@sergei-maertens sergei-maertens merged commit b96d2ae into master Nov 12, 2024
36 checks passed
@sergei-maertens sergei-maertens deleted the issue/4772-select-component-int-values branch November 12, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-backport Fix must be backported to stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

int as value of select component issue
2 participants