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 "mismatched labels and translations" export failure #4978

Merged

Conversation

jnm
Copy link
Member

@jnm jnm commented Jun 17, 2024

Checklist

  1. If you've added code that should be tested, add tests
  2. If you've changed APIs, update (or create!) the documentation
  3. Ensure the tests pass
  4. Make sure that your code lints and that you've followed our coding style
  5. Write a title and, if necessary, a description of your work suitable for publishing in our release notes
  6. Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
  7. Open an issue in the docs if there are UI/UX changes

Description

Resolves a bug that affected multi-language forms using select_one_from_file or select_multiple_from_file

Notes

This includes a fix to formpack that prevents the file column, created when formpack.utils.expand_content.expand_content() processes select_*_from_file questions, from being transformed into media::file and treated as a translatable column, which it is not (!)

Additionally, this change calls formpack.utils.bugfix.repair_file_column_content_in_place() to undo the damage to existing Asset.content and AssetVersion.version_content. This repair utility is invoked in two places:

  1. on the Asset and all associated AssetVersions when kobo.apps.reports.report_data.build_formpack() is called, which happens during report and export generation;
  2. on the Asset content alone when a GET request is sent to the asset detail endpoint.

Related issues

kobotoolbox/formpack#323 (fix upon which this PR depends)
kobotoolbox/formpack#322 (detailed explanation of problem)
kobotoolbox/formpack#321 (PR which introduced the bug)

jnm added 3 commits June 17, 2024 01:25
`pip-compile` was attempting to downgrade `django-allauth` because the
last upgrade was done directly the `.txt` requirements files instead of
`requirements.in`
@jnm jnm added the CRITICAL Red alert! Fix me ASAP! label Jun 17, 2024
@jnm jnm merged commit be33572 into release/2.024.17 Jun 17, 2024
5 checks passed
@jnm jnm deleted the fix-mismatched-labels-and-translations-export-failure branch June 17, 2024 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CRITICAL Red alert! Fix me ASAP!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant