Skip to content

Commit

Permalink
add additional parameters for add_worklog()
Browse files Browse the repository at this point in the history
  • Loading branch information
Lev Baranov committed Oct 16, 2024
1 parent 9900396 commit e6b19a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2795,6 +2795,7 @@ def add_worklog(
started: datetime.datetime | None = None,
user: str | None = None,
visibility: dict[str, Any] | None = None,
**additionalProperties
) -> Worklog:
"""Add a new worklog entry on an issue and return a Resource for it.
Expand All @@ -2812,6 +2813,8 @@ def add_worklog(
visibility (Optional[Dict[str,Any]]): Details about any restrictions in the visibility of the worklog.
Example of visibility options when creating or updating a worklog.
``{ "type": "group", "value": "<string>", "identifier": "<string>"}``
**additionalProperties: Extra properties of any type may be provided to this object.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-worklogs/#api-rest-api-3-issue-issueidorkey-worklog-post-request-body
Returns:
Worklog
Expand Down Expand Up @@ -2851,6 +2854,8 @@ def add_worklog(
"active": False,
}
data["updateAuthor"] = data["author"]
if additionalProperties:
data.update(additionalProperties)
# report bug to Atlassian: author and updateAuthor parameters are ignored.
url = self._get_url(f"issue/{issue}/worklog")
r = self._session.post(url, params=params, data=json.dumps(data))
Expand Down

0 comments on commit e6b19a2

Please sign in to comment.