Skip to content

fix: save a new form version when a form is replaced#3075

Open
kelvin-muchiri wants to merge 1 commit into
mainfrom
bump-version-on-form-replace
Open

fix: save a new form version when a form is replaced#3075
kelvin-muchiri wants to merge 1 commit into
mainfrom
bump-version-on-form-replace

Conversation

@kelvin-muchiri
Copy link
Copy Markdown
Contributor

@kelvin-muchiri kelvin-muchiri commented Apr 22, 2026

Changes / Features implemented

Previously, replacing a form whose XLSForm or XML carried the same version string as an existing XFormVersion row silently swallowed the unique_together IntegrityError in create_xform_version, leaving only the overwritten dd.xls/xml behind with no audit trail.

Auto-bump the version to "-N" (smallest unused N >= 2) when a replacement would otherwise collide.

Steps taken to verify this change does what is intended

  • QA

Side effects of implementing this change

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #3076

Previously, replacing a form whose XLSForm or XML carried the same
version string as an existing XFormVersion row silently swallowed the
unique_together IntegrityError in create_xform_version, leaving only
the overwritten dd.xls/xml behind with no audit trail.

Auto-bump the version to "<original>-N" (smallest unused N >= 2) when a
replacement would otherwise collide.
@kelvin-muchiri kelvin-muchiri force-pushed the bump-version-on-form-replace branch from f8afe4a to ff6e675 Compare April 27, 2026 08:24
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.

XForm version not saved when a form is replaced with the same version string

1 participant