feat(revisions): allow revision comment editing after creation #174
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
From GAP_ANALYSIS.md Open Question #2: "Allow comment updates post-creation?"
Decision: Yes. Revision comments should be editable after creation.
Current Behavior
Revision comments are set at creation time via
POST /api/items/{partNumber}/revisionsand are immutable thereafter. The existingPATCH /api/items/{partNumber}/revisions/{revision}endpoint (HandleUpdateRevisioninhandlers.go) only supports updatingstatusandlabelsfields — it does not acceptcomment.Proposed Behavior
Extend
PATCH /api/items/{partNumber}/revisions/{revision}to accept an optionalcommentfield:Rules
editorrole or above can edit the comment on adraftorreviewrevisionreleasedorobsoleterevisions can only be edited byadminusersrevision.updatedshould fire with the changed fieldsFiles to Modify
internal/api/handlers.go—HandleUpdateRevision(): addcommentto the accepted fields in the update request struct and SQL UPDATEinternal/db/items.go—UpdateRevision()or equivalent: addcommentcolumn to the UPDATE queryRelated
PATCH /api/items/{pn}/revisions/{rev}handles status and labels already