{"action":"created","issue":{"url":"https://api.github.com/repos/opf/openproject/issues/2345","labels_url":"https://api.github.com/repos/opf/openproject/issues/2345/labels{/name}","comments_url":"https://api.github.com/repos/opf/openproject/issues/2345/comments","events_url":"https://api.github.com/repos/opf/openproject/issues/2345/events","html_url":"https://github.com/opf/openproject/pull/2345","id":51780159,"number":2345,"title":"Harmonize watchers endpoints","user":{"login":"NobodysNightmare","id":453584,"avatar_url":"https://avatars.githubusercontent.com/u/453584?v=3","gravatar_id":"","url":"https://api.github.com/users/NobodysNightmare","html_url":"https://github.com/NobodysNightmare","followers_url":"https://api.github.com/users/NobodysNightmare/followers","following_url":"https://api.github.com/users/NobodysNightmare/following{/other_user}","gists_url":"https://api.github.com/users/NobodysNightmare/gists{/gist_id}","starred_url":"https://api.github.com/users/NobodysNightmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NobodysNightmare/subscriptions","organizations_url":"https://api.github.com/users/NobodysNightmare/orgs","repos_url":"https://api.github.com/users/NobodysNightmare/repos","events_url":"https://api.github.com/users/NobodysNightmare/events{/privacy}","received_events_url":"https://api.github.com/users/NobodysNightmare/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/opf/openproject/labels/documentation","name":"documentation","color":"c7def8"},{"url":"https://api.github.com/repos/opf/openproject/labels/work%20in%20progress","name":"work in progress","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-12-12T08:04:34Z","updated_at":"2015-06-03T12:43:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/opf/openproject/pulls/2345","html_url":"https://github.com/opf/openproject/pull/2345","diff_url":"https://github.com/opf/openproject/pull/2345.diff","patch_url":"https://github.com/opf/openproject/pull/2345.patch"},"body":"## OpenProject Work Packages\r\n\r\n* https://community.openproject.org/work_packages/17755\r\n* includes non WP specifications that harmonize the API\r\n\r\n## Content\r\n\r\n* new endpoint for current watchers of a work package\r\n* clarification on when to return 404 and 403 for some endpoints\r\n    * this change *should* not affect the actual implementation, however I did not verify that\r\n* allow adding single watchers\r\n* endpoint for available watchers is now also placed under a project scope\r\n\r\n## Changes to existing endpoints\r\n\r\n* [x] new error identifier that shall also be used for `PATCH work package` (and its form)\r\n* [ ] there is an endpoint to list watchers of a work package\r\n* [ ] watchers are linked in Work Package\r\n* [x] the `watch` link of the work package has an updated `data` section (that is now called `payload`)\r\n* [ ] watchers are embedded as collection resource\r\n* [x] add watchers now accepts a new request format\r\n    * [x] adapt angular client\r\n* [ ] add watchers now returns the list of current watchers\r\n* [ ] the available watchers endpoint was moved into a per project scope\r\n\r\n## Additional changes required to implementation\r\n\r\nThe implementation thankfully differed from the existing documentaion already. Here are the things I could find:\r\n\r\n* [x] `watchChanges` has to be called `watch` (same for `unwatchChanges` which is now `unwatch`)\r\n* [ ] fix HTTP 500 adding a non-existant user as watcher\r\n* [ ] check response when removing a non-watching user/non existant user as watcher"},"comment":{"url":"https://api.github.com/repos/opf/openproject/issues/comments/108380999","html_url":"https://github.com/opf/openproject/pull/2345#issuecomment-108380999","issue_url":"https://api.github.com/repos/opf/openproject/issues/2345","id":108380999,"user":{"login":"ulferts","id":617519,"avatar_url":"https://avatars.githubusercontent.com/u/617519?v=3","gravatar_id":"","url":"https://api.github.com/users/ulferts","html_url":"https://github.com/ulferts","followers_url":"https://api.github.com/users/ulferts/followers","following_url":"https://api.github.com/users/ulferts/following{/other_user}","gists_url":"https://api.github.com/users/ulferts/gists{/gist_id}","starred_url":"https://api.github.com/users/ulferts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulferts/subscriptions","organizations_url":"https://api.github.com/users/ulferts/orgs","repos_url":"https://api.github.com/users/ulferts/repos","events_url":"https://api.github.com/users/ulferts/events{/privacy}","received_events_url":"https://api.github.com/users/ulferts/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T12:43:58Z","updated_at":"2015-06-03T12:43:58Z","body":"@NobodysNightmare as there are different things one can watch (WP, wiki, ...) and those require separate permissions, the list can not be on the project scope. It therefore has to be moved to the work package scope IMO."}}