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

kobotoolbox / kpi / 40688155069
86%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 28 Oct 2026 12:34PM UTC
Jobs 10
Files 934
Run time 1min
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

28 Oct 2026 12:28PM UTC coverage: 83.723% (+0.02%) from 83.708%
40688155069

push

github

web-flow
feat(submissions): save and display tz info for submission time DEV-699 (#7697)

### đŸ“Ŗ Summary
Export timezone information for submission times.

### 👷 Description for instance maintainers
Adds a new (very) long-running migration that will hit all instances for
all xforms belonging to active users. The actual updates will all be
done in mongo. Queries have all been batched so it should only update
~100 records at a time.


### 💭 Notes
New submissions will be saved with timezone info on the timestamp in
mongo. For older ones, we will assume they were saved in UTC and add the
timezone on the fly when returning them in exports or the data endpoint.

#### Known risks

* If a formerly inactive user becomes active while the migration is
still running, we may end up skipping them if the user processing has
already progressed beyond their id. They can still reprocess individual
xforms using the management command
* Any error will crash the whole migration, so if there's one bad xform,
we may end up with a situation where the migration constantly starts and
fails. However, since we don't know what kinds of records may cause
problems or what those problems may be, we don't want to just tag
failures and move on since, if there's a bug in the code, we may end up
tagging everything as a failure.
* If there are multiple xforms with the same id string, and two
instances of the management command running for that string, the caches
could interfere with each other and cause instances to be skipped. This
is a very low risk, so we just ignore it.

### Preview steps

Test command:
1. â„šī¸ have an account and a project
2. Add several submissions (while still on main)
3. 🔴 [on main] notice in mongo that `_submission_time` lacks timezone
information
4. [on PR] run `./manage.py add_tz_information_to_submission_times
--xform_id <xform_id_string>`
5. đŸŸĸ [on PR] notice in mongo that `_submission_time` includes the UTC
`+00:00` suffix.

Test export:
1. â„šī¸ have an account and a proj... (continued)

10798 of 14100 branches covered (76.58%)

11 of 50 new or added lines in 4 files covered. (22.0%)

2 existing lines in 1 file now uncovered.

34309 of 40979 relevant lines covered (83.72%)

5.67 hits per line

Uncovered Changes

Lines Coverage ∆ File
30
0.0
kobo/apps/long_running_migrations/jobs/0034_add_submission_tz.py
7
68.78
-1.59% kpi/utils/mongo_helper.py
2
66.59
0.24% kpi/deployment_backends/base_backend.py

Coverage Regressions

Lines Coverage ∆ File
2
68.78
-1.59% kpi/utils/mongo_helper.py
Jobs
ID Job ID Ran Files Coverage
1 40688155069.1 28 Oct 2026 12:34PM UTC 929
52.85
2 40688155069.2 28 Oct 2026 12:35PM UTC 929
50.06
3 40688155069.3 28 Oct 2026 12:35PM UTC 929
55.6
4 40688155069.4 28 Oct 2026 12:37PM UTC 929
57.57
5 40688155069.5 28 Oct 2026 12:37PM UTC 931
54.07
6 40688155069.6 28 Oct 2026 12:37PM UTC 932
64.44
7 40688155069.7 28 Oct 2026 12:38PM UTC 931
58.62
8 40688155069.8 28 Oct 2026 12:38PM UTC 931
51.31
9 40688155069.9 28 Oct 2026 12:39PM UTC 931
57.08
10 40688155069.10 28 Oct 2026 12:42PM UTC 934
66.73
Source Files on build 40688155069
  • Tree
  • List 934
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • e7d44be4 on github
  • Prev Build on main (#40670777973)
  • Next Build on main (#40701219075)
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