Skip to content

Commit

Permalink
Docs & doc string fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitarOnGithub committed Aug 15, 2024
1 parent d6e15ce commit b0b552e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
20 changes: 10 additions & 10 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ If you only want a few specific fields, save time by asking for them explicitly:

issue = jira.issue('JRA-1330', fields='summary,comment')

Reassign an issue::
Reassigning an issue can be done either by providing the username/accountId (hosted/cloud) or the User Resource object itself::

# requires issue assign permission, which is different from issue editing permission!
# via username, for hosted instances
jira.assign_issue(issue, 'newassignee')
# or accountId, for cloud instances
jira.assign_issue(issue, 'gweg3:5fr23r23r-3041-4342-23f2-2g3g232c2e1234:8008sdg3-441a-12f2-9sg1-erbwer3q3r3')
# or via the User retrieved from search_users()
jira.assign_issue(issue, user_resource)
Reassign an issue:
Reassigning an issue can be done either by providing the username/accountId (hosted/cloud) or the User Resource object itself::

# requires issue assign permission, which is different from issue editing permission!
# via username, for hosted instances
jira.assign_issue(issue, 'newassignee')
# or accountId, for cloud instances
jira.assign_issue(issue, 'gweg3:5fr23r23r-3041-4342-23f2-2g3g232c2e1234:8008sdg3-441a-12f2-9sg1-erbwer3q3r3')
# or via the User retrieved from search_users()
jira.assign_issue(issue, user_resource)

If you want to unassign it again, just do::

Expand Down
4 changes: 3 additions & 1 deletion jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2232,6 +2232,7 @@ def assign_issue(self, issue: int | str, assignee: str | None | User) -> bool:
issue (Union[int, str]): the issue ID or key to assign
assignee (Union[str, User]): username (for hosted) or account ID (for cloud) of the user to add to the
watchers list. Alternatively, you can provide the User object itself.
None will set it to unassigned. -1 will set it to Automatic.
Returns:
bool
Expand Down Expand Up @@ -2688,7 +2689,8 @@ def add_watcher(self, issue: str | int, watcher: str | User) -> Response:
Args:
issue (Union[str, int]): ID or key of the issue affected
watcher (str): username (for hosted) or account ID (for cloud) of the user to add to the watchers list
watcher (str | User): username (for hosted) or account ID (for cloud) of the user to add to the watchers
list
Returns:
Response
Expand Down

0 comments on commit b0b552e

Please sign in to comment.