kpi is the (frontend) server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.
[x] If you've added code that should be tested, add tests
[ ] If you've changed APIs, update (or create!) the documentation
[x] Ensure the tests pass
[x] Make sure that your code lints and that you've followed our coding style
[x] Write a title and, if necessary, a description of your work suitable for publishing in our release notes
[x] Mention any related issues in this repository (as #ISSUE) and in other repositories (as kobotoolbox/other#ISSUE)
[ ] 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:
on the Asset and all associated AssetVersions when kobo.apps.reports.report_data.build_formpack() is called, which happens during report and export generation;
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)
Checklist
Description
Resolves a bug that affected multi-language forms using
select_one_from_file
orselect_multiple_from_file
Notes
This includes a fix to formpack that prevents the
file
column, created whenformpack.utils.expand_content.expand_content()
processesselect_*_from_file
questions, from being transformed intomedia::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 existingAsset.content
andAssetVersion.version_content
. This repair utility is invoked in two places:Asset
and all associatedAssetVersion
s whenkobo.apps.reports.report_data.build_formpack()
is called, which happens during report and export generation;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)