---
phase: 09-etapes
plan: 03
subsystem: tasks
tags: [go, htmx, templ, etapes]
requires:
  - phase: 09-etapes
    plan: 02
    provides: etape management routes and fragments
provides:
  - task create and edit Etape selector
  - task update assignment and unassignment
  - same-tablo validation for task etape assignment
affects: [09-etapes, tasks]
tech-stack:
  added: []
  patterns: [selector-based assignment, same-tablo validation before task update]
key-files:
  created: []
  modified:
    - backend/internal/web/handlers_tasks.go
    - backend/templates/tasks.templ
    - backend/templates/tasks_forms.go
    - backend/internal/web/handlers_tasks_test.go
key-decisions:
  - "Keep task-card quick assignment dropdowns out of this phase, per UI-SPEC."
  - "Use the same parseOwnedEtapeID validation helper for create and update."
patterns-established:
  - "Task edit forms load etapes from the owned tablo and render escaped option labels."
  - "Task updates preserve status and position while changing only text fields and etape assignment."
requirements-completed: []
completed: 2026-05-15
---

# Plan 09-03 Summary

**Task create and edit forms can assign or clear an etape with same-tablo validation**

## Accomplishments

- Added RED coverage for edit selector rendering, assign/unassign update behavior, foreign etape rejection, and unassigned filtering.
- Added visible `Etape` selectors with `No etape` first option to task create and edit forms.
- Updated task edit/update handlers to load etapes for the owned tablo and validate submitted assignment ids.
- Preserved task status and position while allowing task update to change etape assignment.

## Task Commits

1. **Task 1: Add RED coverage for assignment and filters** - `9f6c7eb`
2. **Task 2: Implement form assignment and filter-aware task loading** - `b22d79d`

## Verification

- `cd backend && just generate`
- `cd backend && go test ./internal/web -run 'TestTaskEditRendersEtapeSelector|TestTaskUpdateAssignsAndUnassignsEtape|TestTaskAssignmentRejectsForeignEtape|TestTasksTabUnassignedFilter|TestTaskUpdate|TestTasksKanbanRenders' -count=1 -v`
- `cd backend && go test ./... -count=1`
- `git diff --check`

Note: DB-backed integration tests compile but are skipped locally because `TEST_DATABASE_URL`/`DATABASE_URL` is unset.

## Deviations from Plan

None.

## Issues Encountered

None.

## User Setup Required

None.

## Next Phase Readiness

Plan 09-04 can now validate reorder preservation and the full browser workflow over the completed create/edit/delete/filter surfaces.

## Self-Check: PASSED
