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

kobotoolbox / kpi / 14755269238 / 2
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: dev-1475-clean-up-refactor-subsequences
DEFAULT BRANCH: master
Ran 30 Apr 2025 01:43PM UTC
Files 653
Run time 79min
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.83% (+2.2%) from 78.668%
14755269238.2

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>

6206 of 9863 branches covered (62.92%)

23557 of 29144 relevant lines covered (80.83%)

0.81 hits per line

Source Files on job 14755269238.2
  • Tree
  • List 653
  • Changed 27
  • Source Changed 0
  • Coverage Changed 27
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 14755269238
  • e7bb3ff3 on github
  • Prev Job for on main (#14732544675.1)
  • Next Job for on main (#14757004560.2)
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