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

kobotoolbox / kpi / 29345082749

14 Jul 2026 03:22PM UTC coverage: 81.524% (+0.01%) from 81.51%
29345082749

push

github

web-flow
feat(KMLExport): route KML exports through KPI export tasks DEV-1591 (#7236)

### 📣 Summary
KML exports now run through KPI export tasks and no longer use the
legacy OpenRosa KML export endpoint.

### 💭 Notes
- Updated formpack pin to the latest [commit] that implements kml
exports
(https://github.com/kobotoolbox/formpack/commit/3bf65b74f)
- Added kml as a valid export type in SubmissionExportTask pipeline.
- Writes KML output via export.to_kml(..., flatten=True).
- Added geo-question field auto-inclusion logic for KML when fields
filtering is used, so geometry columns are still fetched.

### 👀 Preview steps

1. ℹ️ Have an account, a project, and a deployed survey with at least
one of each geo type question (geopoint, geotrace, and geoshape).
2. Submit at least one response containing geo data.
3. Navigate to `/api/v2/docs` and create an export task
`/api/v2/assets/{uid_asset}/exports/` with payload:
```
{
  "type": "kml",
  "lang": "_default",
  "group_sep": "/",
  "hierarchy_in_labels": false,
  "fields_from_all_versions": false,
  "multiple_select": "both"
}
```
4. 🟢 Should succeed with HTTP 201 Created. Navigate to {Project Name} >
Data > Downloads you should see an export generated in the export list
with no type yet (as the frontend hasn't been implemented).
<img width="1208" height="734" alt="Screenshot 2026-07-10 at 2 11 27 PM"
src="https://github.com/user-attachments/assets/8dcdd1d0-72d6-408c-a753-7b3cad6d464e"
/>
5. 🟢 Download the export and validate that the kml is correct by
uploading the file to google earth.
6. 🟢 Check that requests to the openRosa endpoint are bypassed by trying
to generate a kml export through the legacy kml exports. You should get
an error:
<img width="1210" height="730" alt="Screenshot 2026-07-10 at 2 09 28 PM"
src="https://github.com/user-attachments/assets/c0178af4-0923-43ed-9235-2a85a31a4290"
/>

9362 of 12693 branches covered (73.76%)

9 of 50 new or added lines in 3 files covered. (18.0%)

1 existing line in 1 file now uncovered.

30398 of 37287 relevant lines covered (81.52%)

5.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.58
/kpi/models/import_export_task.py


Source Not Available

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