Skip to content

Tasks API - let competition organizers update a task used by their competition - #2649

Merged
Didayolo merged 1 commit into
codalab:task-update-collaboratorsfrom
bruAristimunha:task-update-collaborators
Oct 20, 2026
Merged

Didayolo merged 1 commit into
codalab:task-update-collaboratorsfrom
bruAristimunha:task-update-collaborators

Conversation

@bruAristimunha

@bruAristimunha bruAristimunha commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follows @Didayolo's comment on #2624: the common reason a phase task gets replaced is that a co-organizer cannot edit a task created by the challenge owner. Replacing detaches every existing score (n/a on the leaderboard) and usually ends with the old task being deleted.

TaskViewSet.update only allowed the creator or a superuser. This PR also allows:

  • users the task is shared_with
  • organizers (creator or collaborators) of a competition whose phase uses the task

so the task can be fixed in place: same task id, existing scores stay comparable, re-run keeps working. Deletion stays creator-only (it is irreversible; see #2648).

Together with #2642 (flag outdated scores), #2644 (resubmit on current tasks) and #2648 (refuse to delete a task with submissions), this removes the need to change re-run semantics as in #2624.

Issues this PR resolves

A checklist for hand testing

  • As user A, create a task and a competition using it; add user B as collaborator
  • As user B, open the task and change its scoring program (or name): the update is accepted
  • As a user who is neither creator, shared-with, nor organizer: the update is refused (403)
  • As user B, deleting the task is still refused

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work

…mpetition

Only the task creator (or a superuser) could edit a task. A co-organizer who
needs to fix the scoring program or a dataset therefore has to upload a new
task and replace the old one in the phase, which detaches every existing
score (shown as n/a) and leads to deleting the old task. Allow users the
task is shared with and organizers of a competition that uses the task to
update it in place. Deleting stays creator-only.
@Didayolo Didayolo self-assigned this Oct 20, 2026
@Didayolo
Didayolo changed the base branch from develop to task-update-collaborators October 20, 2026 17:39
@Didayolo
Didayolo merged commit a74e8e1 into codalab:task-update-collaborators Oct 20, 2026
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