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 notify option for add_worklog #1757

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion 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,
notify: bool=True,
) -> Worklog:
"""Add a new worklog entry on an issue and return a Resource for it.

Expand All @@ -2418,17 +2419,20 @@ 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

notify (bool): Whether or not to send a notification to the new user. (Default: True)
Returns:
Worklog
"""

params = {}
if adjustEstimate is not None:
params["adjustEstimate"] = adjustEstimate
if newEstimate is not None:
params["newEstimate"] = newEstimate
if reduceBy is not None:
params["reduceBy"] = reduceBy
if not notify:
params["notifyUsers"] = "false"

data: dict[str, Any] = {}
if timeSpent is not None:
Expand Down
Loading