Skip to content

Feature: Place a task in a workflow stage on create or update - #141

Merged
rafaeljusto merged 1 commit into
mainfrom
feature/task-workflow
Aug 28, 2026
Merged

Feature: Place a task in a workflow stage on create or update#141
rafaeljusto merged 1 commit into
mainfrom
feature/task-workflow

Conversation

@rafaeljusto

Copy link
Copy Markdown
Contributor

Description

The v3 task request body carries a "workflows" object alongside "task", taking workflowId, stageId and positionAfterTask, but nothing modelled it: only the response side existed, and TaskWorkflowStage's comment claimed a request role it never had.

TaskWorkflows fills that in on TaskCreateRequest and TaskUpdateRequest, with IsZero so an unrelated request sends no such key. Its doc records what the two endpoints do and do not say: on create, the task joins every workflow attached to its project in the backlog, and a workflow that is not one of the project's own is ignored with a 201; on update, the task must already be in the named workflow, or the answer is 404. Neither asks for permission to edit the workflow, unlike the routes behind WorkflowStageTaskMove.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • Tests pass locally (go test -v ./...)
  • Added/updated tests for new functionality

Checklist

  • Code follows project style guidelines
  • Self-reviewed the code
  • Added necessary documentation
  • No new warnings or errors

The v3 task request body carries a "workflows" object beside "task", taking
workflowId, stageId and positionAfterTask, but nothing modelled it: only the
response side existed, and TaskWorkflowStage's comment claimed a request role
it never had.

TaskWorkflows fills that in on TaskCreateRequest and TaskUpdateRequest, with
IsZero so an unrelated request sends no such key. Its doc records what the two
endpoints do and do not say: on create the task joins every workflow attached
to its project in the backlog, and a workflow that is not one of the project's
own is ignored with a 201; on update the task must already be in the named
workflow or the answer is 404. Neither asks for permission to edit the
workflow, unlike the routes behind WorkflowStageTaskMove.
@rafaeljusto
rafaeljusto requested a review from a team as a code owner August 28, 2026 19:20
@rafaeljusto
rafaeljusto merged commit 6e109f5 into main Aug 28, 2026
4 checks passed
@rafaeljusto
rafaeljusto deleted the feature/task-workflow branch August 28, 2026 19:24
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.

1 participant