Add work package watcher
add_work_package_watcherSubscribe a user to a work package's notifications so they receive updates on comments and changes without being assigned to the ticket.
Instructions
Subscribe a user to a work package's notifications.
Use this when someone should be kept in the loop on a ticket without being assigned to it. Watchers receive OpenProject's notifications for comments and changes. Returns the watcher (user id and name), the watch state after the call, and whether this call actually changed anything.
Pitfalls. The user must already be able to see the work package;
OpenProject answers 422 with a violation on user otherwise, and
adding someone other than yourself needs the add-work-package-watchers
permission (adding yourself only needs view access). Calling twice is
harmless: the second call reports changed: false. Watching is not
assignment — use update_work_package(assignee=...) for that.
Cross-references: get_work_package(include=['watchers']) lists who
already watches; remove_work_package_watcher is the reverse;
list_work_package_comments shows what watchers are being notified
about.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | Numeric id of the user to add. Get it from list_users, from get_instance_info for the current user, or from any Ref in a work-package result. The string 'me' is not accepted here — the API needs a real id. | |
| work_package_id | Yes | Work package to watch. Ids come from search_work_packages, list_work_packages or get_work_package. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | No | ||
| changed | No | ||
| message | Yes | ||
| watching | Yes | ||
| work_package_id | Yes |