Skip to content

Commit

Permalink
Use user_id when adding watcher (#1682)
Browse files Browse the repository at this point in the history
  • Loading branch information
ABizzinotto authored Jun 29, 2023
1 parent 063ce1a commit 6f58b70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2342,7 +2342,9 @@ def add_watcher(self, issue: str | int, watcher: str) -> Response:
Response
"""
url = self._get_url("issue/" + str(issue) + "/watchers")
return self._session.post(url, data=json.dumps(watcher))
# Use user_id when adding watcher
watcher_id = self._get_user_id(watcher)
return self._session.post(url, data=json.dumps(watcher_id))

@translate_resource_args
def remove_watcher(self, issue: str | int, watcher: str) -> Response:
Expand Down

0 comments on commit 6f58b70

Please sign in to comment.