Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add visibility argument #1552

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2404,6 +2404,7 @@ def add_worklog(
comment: (str | None) = None,
started: (datetime.datetime | None) = None,
user: (str | None) = None,
visibility: (Dict[str, Any] | None) = None,
) -> Worklog:
"""Add a new worklog entry on an issue and return a Resource for it.

Expand All @@ -2418,6 +2419,15 @@ def add_worklog(
comment (Optional[str]): optional worklog comment
started (Optional[datetime.datetime]): Moment when the work is logged, if not specified will default to now
user (Optional[str]): the user ID or name to use for this worklog
visibility (Optional[Dict[str,Any]]): Details about any restrictions in the visibility of the worklog.
Optional when creating or updating a worklog. ::
```js
{
"type": "group", # "group" or "role"
"value": "<string>",
"identifier": "<string>" # OPTIONAL
}
```

Returns:
Worklog
Expand All @@ -2441,6 +2451,8 @@ def add_worklog(
# we log user inside comment as it doesn't always work
data["comment"] = user

if visibility is not None:
data["visibility"] = visibility
if started is not None:
# based on REST Browser it needs: "2014-06-03T08:21:01.273+0000"
if started.tzinfo is None:
Expand Down
Loading