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

kobotoolbox / kpi / 14834536167 / 1
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1257-remove-v1-forms-endpoint
DEFAULT BRANCH: master
Ran 05 May 2025 11:15AM UTC
Files 654
Run time 15s
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

05 May 2025 10:39AM UTC coverage: 78.711% (+0.02%) from 78.691%
14834536167.1

push

github

web-flow
feat(attachments): update storage counters when attachments are moved to or from trash TASK-590 (#5686)

### 📣 Summary
Ensure storage counters are updated when attachments are trashed or
restored in ongoing projects.


### 📖 Description
This change improves storage accounting by updating
`attachment_storage_bytes` on both `UserProfile` and `XForm` when
attachments are soft-deleted or restored using
`AttachmentTrash.toggle_statuses()`.
- When an attachment is moved to the trash,
`pre_delete_attachment(only_update_counters=True)` is invoked to
decrement storage usage.
- When an attachment is restored, `post_save_attachment(created=True)`
is used to restore the counters.
- Logic is in place to prevent counters from being decremented twice if
the submission is deleted after the attachment has already been trashed.

---------

Co-authored-by: Olivier Leger <olivierleger@gmail.com>

6073 of 9909 branches covered (61.29%)

23042 of 29274 relevant lines covered (78.71%)

0.79 hits per line

Source Files on job 14834536167.1
  • Tree
  • List 654
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 14834536167
  • fadfc21f on github
  • Prev Job for on main (#14796463193.1)
  • Next Job for on main (#14863645648.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc