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

kobotoolbox / kpi / 14834536167
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1452-new_action
DEFAULT BRANCH: master
Ran 05 May 2025 11:15AM UTC
Jobs 2
Files 654
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

05 May 2025 10:39AM UTC coverage: 80.836% (+0.02%) from 80.818%
14834536167

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>

6194 of 9859 branches covered (62.83%)

32 of 32 new or added lines in 2 files covered. (100.0%)

23664 of 29274 relevant lines covered (80.84%)

1.6 hits per line

Jobs
ID Job ID Ran Files Coverage
1 14834536167.1 05 May 2025 11:15AM UTC 654
78.71
2 14834536167.2 05 May 2025 12:00PM UTC 654
80.82
Source Files on build 14834536167
  • 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 Repo
  • fadfc21f on github
  • Prev Build on main (#14796463193)
  • Next Build on main (#14863645648)
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

© 2025 Coveralls, Inc