Release Notes - version 2.020.52b

Version 2.020.52b has been deployed to:

Below is a list of changes that likely interests the general KoBo community, followed by other changes that are primarily relevant to more technical audiences. Following that is an excerpt of Enketo’s change log, as this release also includes an update of Enketo from version 2.5.4 to 2.6.0.

We hope you enjoy this release of KoBoToolbox, and best wishes for the new year!

1. New features and enhancements

PR Description Related Issues
#2780 Allow searching submissions by partial UUIDs Fixes #2770
#2617 Extend the effect of clicking “Expand / collapse questions” in the form builder to expand or collapse groups Fixes #2204
#2601 Add support for “hidden” question type to the form builder Fixes #2239
#2519 [Feature] Add a new permission “Delete submissions” permission, distinct from “Edit submissions”
#667 Give (one time only, mirroring #2519) the new “Delete submissions” permission to everyone who already had the “Edit submissions” permission.
Assign object-level delete_data_xform permission everywhere that change_xform is already assigned when migrating. This is in addition to the model-level delete_data_xform assignments that were already being made for all users.
#591 [Feature] Add delete_data permission to KoBoCAT, to support “Delete submissions” permission in KPI #2519

2. Bug fixes and other improvements

PR Description Related Issues
#2926 Restrict permission management (changing sharing settings) to the project owner only. Previously, we allowed those with access to change a project to manage permissions as well, but we received reports that this was confusing or unexpected. A future change will allow project owners to delegate permission management to other accounts; see #2648 Closes #1527
Closes #1528
Related to #2648
#2939 Fix table columns not displaying
This bug was caused by note type exclusion code (#2599) gone wrong. I’ve also added all missing meta data in the single submission modal.
Fixes #2937
#2938 Fix “Data column name” regression
Revert a change that caused the form builder to discard manual data column names.
Fixes #2873
Reverts #2877
Reverts #2723
Reopens #706
#2934 Fix invisible submission counter in header
Set the submission counter text to white in the header. The text couldn’t be seen previously because it was the same color as the background.
Fixes #2932
#2931 Fix permission lookup that was causing a 500 error
If someone’s permissions had been synchronized for a given project from KoBoCAT to KPI, and they had never been assigned any permissions to that project within KPI directly, then they could not access their projects list due to an error in the code that retrieves labels for permissions.
#2924 Improved response time of asset list endpoint (i.e.: /api/v2/assets) and permission assignments endpoint (i.e. /api/v2/assets/<asset_uid>/permission_assignments.json), especially when the response contains lots of results.
Fixed an issue where partial_submission permissions could be assigned at the same time as delete_submissions permission.
Closes #2923
Closes #2922
#2916 Fix the 500 error returned by the back end when users try to share publicly their form and related data
#2910 Use commas as the separator between usernames and disallow spaces in “View submissions only from specific users”
#2909 Group labels are valid even when using the grid theme and must not be removed, even though empty group labels can cause visual issues when previewing forms (but not during data collection). This change verifies that group labels are empty before removing them, fixing the problem described at #2676
#2906 If an unnamed translation exists, require it to be named before allowing other translation-related actions. Part of #2800; related to #2825
#2905 Temporarily disable unreleased encryption settings modal pending addition of important warning and instructions Part of #2692
#2904 Fix issue where data could not be accessed with publicly shared project when user also had explicit view form permission Closes #2870
#2902 Avoid checking usernames individually when handling input for row-level permission assignment, i.e. “View submissions only from specific users”
#2892 Fix environment URLs check that could sometimes prevent the application from loading Fixes #2889
#2874 Stop scrolling to the bottom of the page when adding a new question in the form builder See #2849
Fixes #2837 on master
#2868 Fix API filtering of export list by asset UID, i.e. /exports/?q=source:[your asset uid] Fixes #2855
Note that #2856 is a superior approach, but I wrote this to preserve the old (v1) API behavior.
#2825 When a form has an unnamed language (null translation) alongside one or more named languages, the “Manage Languages” modal prompts the user to name the null translation but does not show the named languages, which can result in attempting to add an already existing language. This can happen when adding translated questions from the library to a form with no translations (or an unnamed language as the default), or when importing XLSForm that contains both label and label::Example Language columns.

This fix shows the simplest modal, which does nothing more than prompt for a language name and code, only when the form has an unnamed language as its only translation. Otherwise, if a unnamed translation exists alongside named translations, the fully-featured “Manage Languages” modal is shown with a warning message.
Fixes 5. of #2800
#2823 Fixes bug that made it impossible to add more than one library question to a survey using the form builder if either the survey or the library question had a named translation Fixes #2822
#2820 Fixes issue where saving your form in formbuilder makes the current form show up in library assets sidebar Fixes 1. of #2800
#2785 Inhibit icon outlines when focusing with keyboard
#2773 Some characters are not allowed in XML, even when represented by numeric character references, and they break form deployment. Strip these from project names and descriptions upon entry. Part of #2721
Related to enketo/enketo-express#181
#2766 Prevent the table view from wrongly appearing when printing a single submission Fixes #2759
#2755 Delete temporary asset when upload (either url or file) fails. Fixes #2751
#2746 Update support and community URLs
Quick & Easy :wink:
Closes #2722
Closes kobotoolbox/tasks#320
#2742 Include translations when saving a question from the form builder to the question library Fixes #2731
#2736 The CSRF token was formerly read once at application load and could become invalid in certain cases, e.g. if the user logged out and back in again in a different tab. This fixes the problem by re-reading the CSRF token from the CSRF cookie before each request to the server. Fixes #2717
#2727 [Reverted] Added basic UI that lets users encrypt their forms from KPI.

Currently has two text fields that will populate a form’s submission_url and public_key respectively.
Completed the “minimum” requirements outlined in #2692
#2723 [Reverted] Prevents cascade questions from breaking when “Data Column Name” is changed in the form builder Fixes #706
#2708 Add a check for grid-theme in unullifytranslations to ignore empty group labels. Semi-related to #2676
Fixes #2707
#2678 Fix infinite spinner on submission modal after clicking arrow Fixes #2669
#2667 Hides the “Repeat this group if necessary” checkbox for matrix questions Fixes #2634
#2650 Reworked submission modal table for displaying responses data. Added some test for utility functions. Added _submitted_by to be displayed in table and in modal. Displaying repeat group answers in table view. Fixes #2651
Part of #2086
Fixes #2207
Fixes #2137
… and possibly something else :sunglasses:
#2622 Improve wording; use https for support link; remove trailing / in activation link to improve compatibility with some email clients Fixes #2433
Fixes #605
#2599 Fix wrong columns being displayed for grouped questions in the table view Fixes #2249
#2572 Render valid XML when returning multiple submissions in the submissions (data) list API. Also fixes pagination in the same context. Closes #2393
#666 Remove submission_count_for_today from legacy /api/v1/forms because it thrashes the database
#663 Remove old logout message from KoBoCAT

3. Of interest to self-hosters

PR Description Related Issues
#2908 Clear default asset ordering in health check to reduce unnecessary load on the database
#2765 Add warning in the Django admin interface about reusing old in-app messages instead of creating new ones from scratch. Old messages do not re-appear to people who have already dismissed them, even if their content changes. Closes #2524
#2713 Add settings to the Django admin interface that control which IP addresses the SSRF validator allows and denies Closes #2697
#2883 Previously, an environment variable had to be set to show information about the running commit to non-superusers. This allows that behavior to be controlled within the Django admin interface.
#2846 Show “Retries exceeded; failed to connect to default database” instead of just “…failed to connect” to make troubleshooting easier
#2734 Avoid corruption of large exports when Amazon S3 storage is used #2827
#2747 Use new support page urls in the code
As in title. Plus use the environment variable to build the urls.
Fixes #2745

4. Of interest to developers

PR Description Related Issues
#2914 Remove bytes prefix from strings in previous migrations. This is safe according to and avoids errors like TypeError: can't concat str to bytes when dealing with KpiUidFields inside new migrations.
#2913 Fix http://kpi/browser_tests/ URL to run mocha tests Fixes #2890
Precedes #2829
#2903 Update our pull request template to indicate that everything following ## Description will be published in the release notes on our forum. Issues mentioned under ## Related issues will also be included in the release notes.
#2876 Fix unit tests by creating a common MockDataExportsBase ancestor class Fixes #2875
#2827 Updating django-storages to use jnm fork
#2803 Remove old update_search_index task; it was for the Whoosh search engine, which has been removed
#2792 Finish conversion of JSON fields stored as text to jsonb Closes #2635
#2774 Cleanup colors to prepare for design system
- all misc unnamed colors are now variables
- merged similar colors
- moved colors to separate file
- removed some unused styles and code linked to them
Part of #2776
Fixes #2790
#2763 Fix Python 2-to-3 bug in in-app messages so that the permission check for PATCHing interactions does not always fail. Fixes #2762
#2753 Extract all translatable strings from front-end code to a single file, with the eventual goal of automatically updating Transifex Closes #2752
#2741 Rework jsonb migration code to be more careful when removing \u0000 from JSON text columns. Fixes #2739
#2672 Update JavaScript dependencies
Updates most of the dependencies - the ones that didn’t require much work to adapt. The complex one will be done separately.
Part of #2618

Enketo changes from 2.5.4 to 2.6.0

[2.6.0] - 2020-12-28

  • Vastly improved performance for most slow forms by replacing the XPath evaluator.

[2.5.6] - 2020-12-23

  • A form with a repeat count that has a relevant, will not create the required amount of repeats when loading an existing record.

[2.5.5] - 2020-12-22

  • Readonly views load with a TypeError.
  • If the same repeat question has both a setvalue/odk-instance-first-load as well as a setvalue/xforms-value-changed, the output can get messed up.
1 Like