• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 30304356116
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 27 Jul 2026 08:56PM UTC
Jobs 9
Files 892
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Jul 2026 08:51PM UTC coverage: 80.496% (-1.0%) from 81.491%
30304356116

push

github

web-flow
fix(submissions): resolve form without UUID for permitted collectors (#7216 backport) (#7326)

### đŸ“Ŗ Summary

Backport of #7216 to `release/2.026.27` (was merged directly onto
`release/2.026.23` and never forward-ported to `main`; missing from
`.27`/`.30`/`main` as a result).

Fix a 404 (No XForm matches the given query) when submitting to a form
whose XML does not include the form UUID, for collectors who have
submission permission but are not the form owner.

### 📖 Description

Submissions are matched to their form by UUID first, then by
`id_string`. When the UUID is missing from the submission XML, the
fallback could not find the form for a collector who is not the owner,
so the submission was rejected with a 404.

### 👷 Description for instance maintainers

The `id_string` fallback in `get_xform_from_submission` no longer scopes
the lookup to the submitter's username; authorization is left to
`check_submission_permissions`.

### 💭 Notes

The previous fallback filtered on `user__username=<submitter>` while
`user` is the form **owner**, so it only matched when the submitter was
the owner and returned a 404 otherwise (it never misrouted). Dropping
that filter means a bare `id_string` lookup can now match several forms
when different accounts share the same `id_string`, so we disambiguate
safely:

- resolve by form UUID first (unchanged),
- otherwise a single `id_string` match, no username filter,
- on an `id_string` collision, route to the form whose instance template
the submission conforms to (full field XPaths, common metadata
excluded),
- ownership is used only as a tie-breaker between schema-equivalent
candidates,
- fail closed (404) when no form conforms or the match stays ambiguous.

New `test_get_xform_from_submission.py` covers the path helpers and the
collision routing.

### 👀 Preview steps

1. â„šī¸ have two accounts: an owner and a collector
2. owner deploys a form and shares it with the collector, granting "Add
submissions"
3. as the collec... (continued)

9174 of 12677 branches covered (72.37%)

9 of 48 new or added lines in 1 file covered. (18.75%)

1494 existing lines in 29 files now uncovered.

30008 of 37279 relevant lines covered (80.5%)

4.81 hits per line

Uncovered Changes

Lines Coverage ∆ File
39
55.43
-29.26% kobo/apps/openrosa/libs/utils/logger_tools.py

Coverage Regressions

Lines Coverage ∆ File
312
0.0
-91.23% kobo/apps/openrosa/apps/viewer/pandas_mongo_bridge.py
209
19.15
-51.99% kobo/apps/openrosa/libs/utils/export_tools.py
206
0.0
-86.19% kobo/apps/openrosa/libs/utils/briefcase_client.py
143
55.43
-29.26% kobo/apps/openrosa/libs/utils/logger_tools.py
87
0.0
-87.88% kobo/apps/openrosa/libs/utils/backup_tools.py
66
33.33
-59.46% kobo/apps/openrosa/apps/viewer/views.py
58
0.0
-90.63% kobo/apps/openrosa/libs/data/query.py
42
46.47
-15.61% kobo/apps/openrosa/apps/viewer/models/data_dictionary.py
41
40.69
1.98% kpi/deployment_backends/openrosa_backend.py
40
0.0
-40.82% kobo/apps/openrosa/apps/viewer/xls_writer.py
40
23.29
-54.79% kobo/apps/openrosa/libs/utils/image_tools.py
39
23.08
-30.0% kobo/apps/openrosa/apps/viewer/tasks.py
33
49.51
-32.04% kobo/apps/openrosa/apps/viewer/models/export.py
32
58.33
-13.33% kobo/apps/openrosa/apps/viewer/models/parsed_instance.py
28
30.14
-19.18% kobo/apps/openrosa/libs/utils/viewer_tools.py
27
61.86
-2.79% kpi/permissions.py
24
33.33
-66.67% kobo/apps/openrosa/libs/utils/decorators.py
20
29.67
-21.98% kobo/apps/openrosa/libs/utils/user_auth.py
14
44.0
-56.0% kobo/apps/openrosa/libs/utils/model_tools.py
11
54.84
-35.48% kobo/apps/openrosa/libs/authentication.py
7
65.19
10.62% kpi/deployment_backends/base_backend.py
4
45.45
-36.36% kobo/apps/openrosa/koboform/__init__.py
3
80.0
-20.0% kobo/apps/openrosa/apps/viewer/signals.py
2
83.33
-6.67% kobo/urls.py
2
91.33
32.24% kpi/models/asset.py
1
91.3
-4.35% kobo/apps/openrosa/libs/permissions.py
1
94.12
-1.18% kobo/apps/openrosa/libs/renderers/renderers.py
1
68.75
-6.25% kobo/apps/openrosa/libs/utils/string.py
1
67.95
0.0% kpi/authentication.py
Jobs
ID Job ID Ran Files Coverage
1 30304356116.1 27 Jul 2026 08:56PM UTC 888
52.74
2 30304356116.2 27 Jul 2026 08:56PM UTC 888
44.24
3 30304356116.3 27 Jul 2026 08:57PM UTC 888
49.53
4 30304356116.4 27 Jul 2026 08:58PM UTC 890
50.86
5 30304356116.5 27 Jul 2026 08:58PM UTC 890
54.0
6 30304356116.6 27 Jul 2026 08:58PM UTC 890
45.6
7 30304356116.7 27 Jul 2026 08:59PM UTC 888
58.73
8 30304356116.8 27 Jul 2026 09:00PM UTC 890
66.69
9 30304356116.9 27 Jul 2026 09:01PM UTC 890
59.88
Source Files on build 30304356116
  • Tree
  • List 892
  • Changed 24
  • Source Changed 0
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • cdf4fe89 on github
  • Prev Build on release/2.026.27 (#30269159095)
  • Next Build on release/2.026.27 (#30305097164)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc