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

kobotoolbox / kpi / 36012895504
83%
master: 76%

Build:
Build:
LAST BUILD BRANCH: guitlle/dev-180-openid-logout
DEFAULT BRANCH: master
Ran 24 Sep 2026 02:33PM UTC
Jobs 10
Files 914
Run time 3min
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

24 Sep 2026 02:27PM UTC coverage: 82.907% (+0.08%) from 82.829%
36012895504

push

github

web-flow
feat(attachments): restore attachments retired by mistake DEV-2804 (#7596)

### 📣 Summary

Support can now bring back, project by project, the files that
disappeared from a submission moments after being uploaded.

### 📖 Description

A file could vanish from its submission right after being sent, with no
error and a success returned to the client. It happened whenever the
name stored with the file did not match the name written in the
submission, which several separate bugs could cause: a name sanitised on
the way in, an accented name stored in one unicode form and written in
another, or a question renamed between two versions of the form. Each of
those was fixed in turn, but none brought back the files already lost.

This adds a way to recover them for one project at a time, on request
rather than in bulk, so that a project can be inspected before anything
is written and the outcome can be checked against what its owner
expects. Restored files return to the data table, attached to their
question, with their storage back in the owner's quota.

### 👷 Description for instance maintainers

Two ways in, both doing the same work on a single project.

A management command, for a shell on the instance:

```
./manage.py restore_soft_deleted_attachments --asset-uid aBcD1234
./manage.py restore_soft_deleted_attachments --asset-uid aBcD1234 --no-dry-run
./manage.py restore_soft_deleted_attachments --asset-uid aBcD1234 --no-dry-run --email you@example.org
```

It reports without writing anything unless `--no-dry-run` is passed.
`--email` mails the log once the run is over, whether it succeeded or
not, and can be repeated for several recipients. `--no-resume` ignores
where an interrupted run stopped.

And Django admin, for support with no shell access, under a new
**Support tools** section: **Attachment restores**
(`/admin/support_tools/attachmentrestorejob/`). Adding a row is what
launches a run. Fill the project in, leave *Dry run* ticked to see what
would come ... (continued)

10289 of 13641 branches covered (75.43%)

258 of 344 new or added lines in 7 files covered. (75.0%)

1 existing line in 1 file now uncovered.

32929 of 39718 relevant lines covered (82.91%)

5.5 hits per line

Uncovered Changes

Lines Coverage ∆ File
34
48.48
kobo/apps/support_tools/admin.py
31
20.51
kobo/apps/support_tools/tasks.py
14
92.31
kobo/apps/openrosa/apps/logger/utils/attachment_restore.py
3
89.58
2.54% kobo/apps/openrosa/libs/utils/logger_tools.py
3
89.29
kobo/apps/support_tools/models.py
1
57.65
0.0% kobo/apps/openrosa/apps/logger/tasks.py

Coverage Regressions

Lines Coverage ∆ File
1
57.65
0.0% kobo/apps/openrosa/apps/logger/tasks.py
Jobs
ID Job ID Ran Files Coverage
1 36012895504.1 24 Sep 2026 02:33PM UTC 909
52.59
2 36012895504.2 24 Sep 2026 02:33PM UTC 909
43.77
3 36012895504.3 24 Sep 2026 02:33PM UTC 909
49.75
4 36012895504.4 24 Sep 2026 02:33PM UTC 911
45.05
5 36012895504.5 24 Sep 2026 02:34PM UTC 911
51.0
6 36012895504.6 24 Sep 2026 02:34PM UTC 911
53.83
7 36012895504.7 24 Sep 2026 02:34PM UTC 912
67.75
8 36012895504.8 24 Sep 2026 02:36PM UTC 909
58.52
9 36012895504.9 24 Sep 2026 02:37PM UTC 911
59.59
10 36012895504.10 24 Sep 2026 02:41PM UTC 914
70.05
Source Files on build 36012895504
  • Tree
  • List 914
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 31f9a187 on github
  • Prev Build on release/2.026.37 (#35854913355)
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