Skip to content

Commit

Permalink
Adding support for expand parameter to worklog fetches
Browse files Browse the repository at this point in the history
  • Loading branch information
bandophahita committed Oct 28, 2024
1 parent ef10e1a commit 73c0648
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2770,17 +2770,18 @@ def worklogs(self, issue: str | int) -> list[Worklog]:
return worklogs

@translate_resource_args
def worklog(self, issue: str | int, id: str) -> Worklog:
def worklog(self, issue: str | int, id: str, expand: str | None=None) -> Worklog:
"""Get a specific worklog Resource from the server.
Args:
issue (Union[str, int]): ID or key of the issue to get the worklog from
id (str): ID of the worklog to get
expand (Optional[str]): extra information to fetch inside each resource
Returns:
Worklog
"""
return self._find_for_resource(Worklog, (issue, id))
return self._find_for_resource(Worklog, (issue, id), expand=expand)

@translate_resource_args
def add_worklog(
Expand Down

0 comments on commit 73c0648

Please sign in to comment.