Skip to content

Add episode filtering and an edits endpoint to schedule items#1159

Merged
frankrousseau merged 5 commits into
cgwire:mainfrom
NicoPennec:main
Jul 13, 2026
Merged

Add episode filtering and an edits endpoint to schedule items#1159
frankrousseau merged 5 commits into
cgwire:mainfrom
NicoPennec:main

Conversation

@NicoPennec

@NicoPennec NicoPennec commented Jul 10, 2026

Copy link
Copy Markdown
Member

Problem

  • The sequences, asset types, and episodes schedule-items endpoints always return the whole production, with no way to scope them to a single episode.
  • There is no schedule-items endpoint for edits, so Edit task types cannot be drilled down in the production schedule.
  • CI broken since ddc4fe9: is_valid_id rejects the uuid.UUID objects passed to get_full_shot, raising a TypeError.

Solution

  • Add an optional episode_id query parameter to the three endpoints, restricting results to the sequences / asset types / episode belonging to the given episode; the filter is project-scoped, so an episode_id from another project returns nothing.
  • Add an edits schedule-items endpoint with the same optional episode_id filter; deleted edits no longer appear in the schedule, and their schedule items are cleaned up.
  • Cast the value to str in is_valid_id, so UUID objects are accepted again.

Add an optional episode_id query parameter to restrict results to the
sequences of a given episode.
[schedule] Add episode_id filter on sequences schedule items

Add an optional episode_id query parameter to restrict results to the
sequences of a given episode.
Add an optional episode_id query parameter to the asset-types
schedule-items endpoint, restricting results to the asset types having
assets natively belonging to the given episode (shared/casted assets
excluded, to match the schedule scope). A new
assets_service.get_asset_types_for_episode helper backs the filter.
Add an optional episode_id query parameter to the episodes
schedule-items endpoint, restricting results to the given episode.
Commit ddc4fe9 added an is_valid_id guard to get_full_shot, but
services are called internally with uuid.UUID objects while
_UUID_RE.match only accepts strings, so test_get_full_shot failed
with TypeError. Cast the value to str before matching: UUID objects
are valid again and non-string garbage returns False instead of
raising.
Add GET /data/projects/<project_id>/schedule-items/<task_type_id>/edits
(one schedule item per edit, with an optional episode_id filter through
the edit parent) so the production schedule can drill down Edit task
types the same way as sequences and episodes.

Unlike sequences and episodes, edits are soft-deleted when they still
have tasks, so canceled edits are excluded from the schedule; on hard
deletion, remove_edit now clears the edit schedule items the same way
sequence and episode removal do.
@NicoPennec NicoPennec changed the title Add an optional episode_id filter to the schedule-items endpoints Add episode filtering and an edits endpoint to schedule items Jul 10, 2026
@frankrousseau
frankrousseau merged commit 7210cd8 into cgwire:main Jul 13, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants