MCP: edit_comment and delete_comment tools #121

Merged
jared merged 2 commits from mcp-comment-edit-delete into development 2026-11-25 17:27:57 -05:00
2 Commits
Author SHA1 Message Date
jaredandClaude Opus 5.5 a819b1cb49 MCP get_ticket: say which tools take a comment_id
Lint / PHP (phpcs PSR-12) (push) Successful in 35s
Lint / JS (eslint) (push) Successful in 12s
Lint / PHP requirements (version + extensions) (push) Successful in 33s
Lint / Deploy (push) Skipped
Lint / Notify on failure (push) Skipped
Lint / JS (eslint) (pull_request) Successful in 12s
Lint / PHP (phpcs PSR-12) (pull_request) Successful in 29s
Lint / PHP requirements (version + extensions) (pull_request) Successful in 35s
Lint / Deploy (pull_request) Skipped
Lint / Notify on failure (pull_request) Skipped
Security / PHP Security (semgrep) (push) Successful in 2m18s
Security / PHP Security (semgrep) (pull_request) Successful in 2m4s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:22:59 -05:00
jaredandClaude Opus 5.5 450b2fac3b MCP: edit_comment and delete_comment tools
Lint / JS (eslint) (push) Successful in 14s
Lint / PHP (phpcs PSR-12) (push) Successful in 35s
Lint / PHP requirements (version + extensions) (push) Successful in 34s
Lint / Deploy (push) Skipped
Lint / Notify on failure (push) Skipped
Lint / PHP (phpcs PSR-12) (pull_request) Successful in 1m0s
Security / PHP Security (semgrep) (push) Successful in 2m44s
Lint / PHP requirements (version + extensions) (pull_request) Successful in 1m9s
Lint / JS (eslint) (pull_request) Successful in 14s
Lint / Deploy (pull_request) Skipped
Lint / Notify on failure (pull_request) Skipped
Security / PHP Security (semgrep) (pull_request) Successful in 1m44s
Two new tickets:write tools, on the same code path as the web UI's comment
edit/delete. The access check, owner-or-admin rule and audit entry moved
out of api/update_comment.php and api/delete_comment.php into
CommentService::updateComment/deleteComment (as add_comment did in #111),
and both endpoints now call it; their responses and status codes are
unchanged apart from extra ticket_id/replies_removed fields.

- edit_comment: replace a comment's text (own comments; admins any).
- delete_comment: delete a comment; replies go with it
  (fk_parent_comment ON DELETE CASCADE), so the result and the audit
  entry report replies_removed.
- A comment on a ticket the user can't see reads as "Comment N not
  found", like a missing one, so restricted tickets stay hidden.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 17:19:54 -05:00