GRI-1962: name blocking playlists on media delete conflict #163
No reviewers
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage!163
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/GRI-1962-media-delete-in-use-playlists"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Deleting a PDF (or any media) that a playlist still uses failed with a generic "Could not delete that item. Try again." message that could never succeed.
Change
crates/server):ApiErrorgains an optionaldetailsfield.DELETE /api/v1/media/{id}now names the referencing playlists in a 409media_in_use'sdetails.playlists, covering both a whole document (via its pages) and a single page/image used directly.?remove_from_playlists=truedetaches the referencing playlist items and deletes in one transaction.frontend-web):MediaScreen.tsxshows the named playlists on a 409 and offers "Remove from these playlists and delete" or cancel, instead of the old generic message. Other errors keep the generic message.Test plan
cargo test -p server --test media_integration -- --include-ignored— 19 passed (covers whole-document and single-page conflict + remove-and-delete)cargo test -p server --lib— 162 passednpm run check(prettier, oxlint, tsc, vitest) — 35/35 tests pass./scripts/local-gates.sh— all gates passedCloses #155