Skip to content

Commit 6f58b70

Browse files
authored
Use user_id when adding watcher (#1682)
1 parent 063ce1a commit 6f58b70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jira/client.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -2342,7 +2342,9 @@ def add_watcher(self, issue: str | int, watcher: str) -> Response:
23422342
Response
23432343
"""
23442344
url = self._get_url("issue/" + str(issue) + "/watchers")
2345-
return self._session.post(url, data=json.dumps(watcher))
2345+
# Use user_id when adding watcher
2346+
watcher_id = self._get_user_id(watcher)
2347+
return self._session.post(url, data=json.dumps(watcher_id))
23462348

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

0 commit comments

Comments
 (0)