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

kobotoolbox / kpi / 14755269238
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1257-remove-v1-forms-endpoint
DEFAULT BRANCH: master
Ran 30 Apr 2025 01:42PM UTC
Jobs 2
Files 653
Run time 345min
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

30 Apr 2025 01:04PM UTC coverage: 80.85% (+0.04%) from 80.807%
14755269238

push

github

web-flow
feat(attachments): new endpoint to bulk delete specific attachments on an asset TASK-588 (#5666)

### đŸ“Ŗ Summary
Add new endpoint which allows users to delete specific attachments on an
project.

### 📖 Description

- Users can only make `DELETE` requests to this endpoint and must pass a
list of attachment uids as the payload
- Users must have either partial or full `edit_submission` permissions
in order to delete attachments

### 👀 Preview steps

1. â„šī¸ have account and a project that has attachments 
2. Make some submissions with a few attachments
3. Check out the new endpoint for the project:
`/api/v2/assets/<asset_uid>/attachments/bulk/`
4. đŸŸĸ Make a `DELETE` request with a list of attachment uids (see example
below) as a payload and verify that you receive a `202 ACCEPTED`
response with the message: "2 attachments deleted"
```
{
    "attachment_uids":
        [
        "attjNgntnj6DJMKkcS7wQw4A",
        "attFRa7aybkEC7rNEqDndQ6V"
    ]
}
```
6. Check out the database 
7. Verify that the Attachments are no longer present 
8. Verify that AttachmentTrash.objects.all().count() should be a least 1
(or more)
9. đŸŸĸ Make a `DELETE` request with an empty list of attachments as a
payload and verify that you receive a `400 BAD REQUEST` with the
message: "The list of attachment UIDs cannot be empty"
10. đŸŸĸ Make a `DELETE` request without a payload and verify that you
receive a `400 BAD REQUEST` with a JSON parse error
11. Share the project with **another user** and grant them permission to
edit submissions
12. đŸŸĸ Make a `DELETE` request as ** another user** and verify that you
receive a `202 ACCEPTED`
13.  Grant  **partial user** partial permissions to edit submissions
12. đŸŸĸ Make a `DELETE` request as ** partial user** and verify that you
receive a `202 ACCEPTED`

---------

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

6160 of 9806 branches covered (62.82%)

60 of 63 new or added lines in 7 files covered. (95.24%)

23563 of 29144 relevant lines covered (80.85%)

1.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
82.32
-0.12% kpi/deployment_backends/base_backend.py
1
73.7
0.74% kpi/deployment_backends/openrosa_backend.py
1
94.44
kpi/serializers/v2/attachment_bulk_delete.py
Jobs
ID Job ID Ran Files Coverage
1 14755269238.1 30 Apr 2025 01:42PM UTC 653
78.72
2 14755269238.2 30 Apr 2025 01:43PM UTC 653
80.83
Source Files on build 14755269238
  • Tree
  • List 653
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • e7bb3ff3 on github
  • Prev Build on main (#14732544675)
  • Next Build on main (#14757004560)
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