Skip to content

Commit 0088e8b

Browse files
FlorianLudwigyajoud-gr
authored andcommitted
feat(worklog): add notify option to add_worklog
Adds a 'notify' option for 'add_worklog'
1 parent 4dfccbe commit 0088e8b

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
@@ -2867,6 +2867,7 @@ def add_worklog(
28672867
started: datetime.datetime | None = None,
28682868
user: str | None = None,
28692869
visibility: dict[str, Any] | None = None,
2870+
notify: bool=True,
28702871
) -> Worklog:
28712872
"""Add a new worklog entry on an issue and return a Resource for it.
28722873
@@ -2884,17 +2885,20 @@ def add_worklog(
28842885
visibility (Optional[Dict[str,Any]]): Details about any restrictions in the visibility of the worklog.
28852886
Example of visibility options when creating or updating a worklog.
28862887
``{ "type": "group", "value": "<string>", "identifier": "<string>"}``
2887-
2888+
notify (bool): Whether or not to send a notification to the new user. (Default: True)
28882889
Returns:
28892890
Worklog
28902891
"""
2892+
28912893
params = {}
28922894
if adjustEstimate is not None:
28932895
params["adjustEstimate"] = adjustEstimate
28942896
if newEstimate is not None:
28952897
params["newEstimate"] = newEstimate
28962898
if reduceBy is not None:
28972899
params["reduceBy"] = reduceBy
2900+
if not notify:
2901+
params["notifyUsers"] = "false"
28982902

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

0 commit comments

Comments
 (0)