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

Fix accidental submission counter reset #4983

Merged

Conversation

sergei-maertens
Copy link
Member

@sergei-maertens sergei-maertens commented Jan 2, 2025

Closes #4969 (partially)

Changes

Fixed backend call to avoid sending stale counter data.

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
  • Dockerfile/scripts

    • Updated the Dockerfile with the necessary scripts from the ./bin folder
  • Commit hygiene

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

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.66%. Comparing base (31220c8) to head (cbc7608).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4983   +/-   ##
=======================================
  Coverage   96.66%   96.66%           
=======================================
  Files         761      761           
  Lines       25957    25957           
  Branches     3393     3393           
=======================================
  Hits        25092    25092           
  Misses        601      601           
  Partials      264      264           

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

If the GET data is stale while the form is loaded in the admin, counter
updates done between loading-and-saving are dropped and overwritten
with the stale counter.

Dropping this key entirely (since it's optional anyway) is the easiest
way to prevent this.
The serializer fields were removed before in 08dfdbc
@sergei-maertens sergei-maertens marked this pull request as ready for review January 2, 2025 18:02
@sergei-maertens sergei-maertens merged commit 25fba12 into master Jan 2, 2025
36 checks passed
@sergei-maertens sergei-maertens deleted the issue/4969-avoid-resetting-submission-counter branch January 2, 2025 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feedback 3.0.0-apha
1 participant