Skip to content

Commit 2306fde

Browse files
committed
add notify option for add_worklog
1 parent ac8e0e8 commit 2306fde

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jira/client.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2404,6 +2404,7 @@ def add_worklog(
24042404
comment: (str | None) = None,
24052405
started: (datetime.datetime | None) = None,
24062406
user: (str | None) = None,
2407+
notify: bool=True,
24072408
) -> Worklog:
24082409
"""Add a new worklog entry on an issue and return a Resource for it.
24092410
@@ -2418,17 +2419,20 @@ def add_worklog(
24182419
comment (Optional[str]): optional worklog comment
24192420
started (Optional[datetime.datetime]): Moment when the work is logged, if not specified will default to now
24202421
user (Optional[str]): the user ID or name to use for this worklog
2421-
2422+
notify (bool): Whether or not to send a notification to the new user. (Default: True)
24222423
Returns:
24232424
Worklog
24242425
"""
2426+
24252427
params = {}
24262428
if adjustEstimate is not None:
24272429
params["adjustEstimate"] = adjustEstimate
24282430
if newEstimate is not None:
24292431
params["newEstimate"] = newEstimate
24302432
if reduceBy is not None:
24312433
params["reduceBy"] = reduceBy
2434+
if not notify:
2435+
params["notifyUsers"] = "false"
24322436

24332437
data: dict[str, Any] = {}
24342438
if timeSpent is not None:

0 commit comments

Comments
 (0)