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

kobotoolbox / kpi / 30304356116 / 2
82%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 27 Jul 2026 08:56PM UTC
Files 888
Run time 22s
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: 44.242% (-1.4%) from 45.642%
30304356116.2

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)

3665 of 12501 branches covered (29.32%)

16453 of 37189 relevant lines covered (44.24%)

0.44 hits per line

Source Files on job 30304356116.2
  • Tree
  • List 888
  • Changed 24
  • Source Changed 0
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 30304356116
  • cdf4fe89 on github
  • Prev Job for on release/2.026.27 (#30269159095.5)
  • Next Job for on release/2.026.27 (#30305097164.8)
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