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

🐛 [#4824] Schedule task to create FormVariables after saving FormStep #4893

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

stevenbal
Copy link
Contributor

@stevenbal stevenbal commented Dec 9, 2024

Closes #4824 partially

Changes

  • Schedule task to create FormVariables after saving FormStep

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 December 9, 2024 12:34
@stevenbal stevenbal added the needs-backport Fix must be backported to stable release branch label Dec 9, 2024
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.62%. Comparing base (3e7b959) to head (87e94c5).
Report is 43 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4893   +/-   ##
=======================================
  Coverage   96.62%   96.62%           
=======================================
  Files         757      757           
  Lines       25945    25965   +20     
  Branches     3419     3423    +4     
=======================================
+ Hits        25069    25089   +20     
  Misses        613      613           
  Partials      263      263           

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

src/openforms/forms/api/viewsets.py Outdated Show resolved Hide resolved
src/openforms/forms/tests/test_api_formsteps.py Outdated Show resolved Hide resolved
src/openforms/forms/tasks.py Show resolved Hide resolved
src/openforms/forms/tests/test_api_formsteps.py Outdated Show resolved Hide resolved
src/openforms/forms/tests/test_api_formsteps.py Outdated Show resolved Hide resolved
@stevenbal stevenbal force-pushed the issue/4824-missing-formvariable-for-component branch from 3a21bec to 0851bab Compare December 10, 2024 11:44
this ensures that the Form cannot be left in a broken state with regards to FormVariables, because every component will always have a FormVariable

this is a bandaid fix, because ideally we would have a single endpoint and the FormStep wouldn't be updated if there are errors with variables
@stevenbal stevenbal force-pushed the issue/4824-missing-formvariable-for-component branch from 0851bab to b98248f Compare December 10, 2024 11:47
@stevenbal stevenbal marked this pull request as ready for review December 10, 2024 11:47
@stevenbal stevenbal force-pushed the issue/4824-missing-formvariable-for-component branch from b98248f to 87e94c5 Compare December 10, 2024 15:28

self.assertEqual(first_name_submission_var1.form_variable, first_name_var1)

# with self.subTest(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently doesn't work, created a separate issue for it #4900

@sergei-maertens sergei-maertens merged commit 92aa9c0 into master Dec 12, 2024
33 checks passed
@sergei-maertens sergei-maertens deleted the issue/4824-missing-formvariable-for-component branch December 12, 2024 10:31
sergei-maertens pushed a commit that referenced this pull request Dec 12, 2024
this ensures that the Form cannot be left in a broken state with regards to FormVariables, because every component will always have a FormVariable

this is a bandaid fix, because ideally we would have a single endpoint and the FormStep wouldn't be updated if there are errors with variables

Backport-of: #4893
sergei-maertens pushed a commit that referenced this pull request Dec 12, 2024
this ensures that the Form cannot be left in a broken state with regards to FormVariables, because every component will always have a FormVariable

this is a bandaid fix, because ideally we would have a single endpoint and the FormStep wouldn't be updated if there are errors with variables

Backport-of: #4893
@sergei-maertens
Copy link
Member

Backports:

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.

error on PUT to /api/v2/forms/{uuid_or_slug}/variables issues (investigating)
2 participants