As an Org or Admin I want to see every tour a task is linked to, with each tour's title and description so that I can check where a task is already used from its detail page.
Assumptions & Constraints
- This needs a new response DTO,
TaskTourResponseDTO for now, with tourId, title, description, location and executionStatus.
- Tour title and description come from the competition facade.
- Since this is meant to be called from that same detail page, the task's owner or an ADMIN or ORG can call it.
Preconditions
TaskAssignmentRepository already exists and can look up assignments by task id.
- The competition facade exposes tour title and description for a given tour id.
Business rules
- The endpoint returns one entry per tour the task is linked to.
- Only an ADMIN or ORG can call this endpoint.
- A request for a task id that doesn't exist results in a 404.
- A task with no assignments returns an empty list, not an error.
Acceptance Criteria
- A GET endpoint accepts a task id and returns every tour that task is linked to.
- Each entry includes the tour's id, title, description, location and executionStatus
- A task with no assignments returns an empty list.
- A request for a nonexistent task id returns a 404.
- A user who isn't an ADMIN or ORG, is rejected with a 403.
Out of scope
- Any assignment specific fields, like visibility or requirements, this endpoint is about tours, not assignment detail.
- Any change to the existing get by tour endpoint.
Epic link
Epic #385 - EPIC: Tasks linkage to tours
Tasks
As an Org or Admin I want to see every tour a task is linked to, with each tour's title and description so that I can check where a task is already used from its detail page.
Assumptions & Constraints
TaskTourResponseDTOfor now, withtourId,title,description,locationandexecutionStatus.Preconditions
TaskAssignmentRepositoryalready exists and can look up assignments by task id.Business rules
Acceptance Criteria
Out of scope
Epic link
Epic #385 - EPIC: Tasks linkage to tours
Tasks
TaskTourResponseDTOwithtourId,title,description,locationandexecutionStatusgetTaskById.