Edit work package comment
edit_work_package_commentRewrite a work-package comment to fix typos or extend a note. Replaces the entire comment text with new markdown content; no history of previous version is kept.
Instructions
Rewrite the text of an existing work-package comment.
Use this to fix a typo, correct a wrong statement, or extend a note you
just posted. Returns the updated journal entry (activity id, author,
markdown text, internal flag, timestamps) in the same shape
list_work_package_comments returns.
Pitfalls. Only comment entries are editable: the journal also holds field-change entries ("Status changed from New to In progress"), which OpenProject records automatically and refuses to alter — this tool rejects those locally, before any write. Editing needs the edit-work-package-comments permission (or edit-own for your own comments); a 403 means the account may read the thread but not rewrite it. The edit replaces the text entirely and OpenProject keeps no API-visible history of the previous version, so do not use it to "undo" — post a correcting comment when the record matters. Editing does not notify anyone.
Cross-references: read the thread and get activity ids with
list_work_package_comments; post a new comment with
add_work_package_comment; change fields (status, assignee, dates)
with update_work_package instead of describing them in prose.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | Yes | The replacement body in markdown. It replaces the whole comment — there is no append mode, so read the current text first if you mean to add to it. @-mentions need OpenProject's mention syntax; plain names notify nobody. | |
| activity_id | Yes | Id of the journal entry to rewrite. It comes from list_work_package_comments (the 'id' of an entry with kind='comment') or from add_work_package_comment's result. It is an activity id, not a work package id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Activity id. Pass it back as list_work_package_comments(activity_id=...) to read a truncated comment in full. | |
| kind | Yes | 'comment' when the entry carries comment text, 'field_change' otherwise. | |
| author | No | User who wrote the entry. | |
| comment | No | Comment body as markdown (raw); html is dropped. Cut to max_comment_chars when 'truncated' is true. | |
| details | No | Field changes recorded with this entry; always a list, empty for a comment-only entry. | |
| version | No | Journal version number of this entry within the work package. | |
| internal | No | True for internal (project-member-only) comments; OpenProject >= 16. | |
| truncated | No | True when the comment was cut to max_comment_chars. | |
| created_at | No | ISO 8601 UTC timestamp. | |
| updated_at | No | ISO 8601 UTC timestamp of the last edit. | |
| work_package | No | Work package the entry belongs to. | |
| comment_length | No | Character length of the untruncated comment; set only when truncated. |