Skip to content

Commit ec4eeff

Browse files
add notify users flag to create issue (#912)
1 parent 94f53ca commit ec4eeff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

atlassian/jira.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,14 +1092,15 @@ def assign_issue(self, issue, account_id=None):
10921092
data = {"name": account_id}
10931093
return self.put(url, data=data)
10941094

1095-
def create_issue(self, fields, update_history=False, update=None):
1095+
def create_issue(self, fields, update_history=False, update=None, notify_users=True):
10961096
"""
10971097
Creates an issue or a sub-task from a JSON representation
10981098
:param fields: JSON data
10991099
mandatory keys are issuetype, summary and project
11001100
:param update: JSON data
11011101
Use it to link issues or update worklog
11021102
:param update_history: bool (if true then the user's project history is updated)
1103+
:param notify_users: bool, if true then send notifications, else do not.
11031104
:return:
11041105
example:
11051106
fields = dict(summary='Into The Night',
@@ -1125,6 +1126,11 @@ def create_issue(self, fields, update_history=False, update=None):
11251126
data["update"] = update
11261127
params = {}
11271128

1129+
if notify_users is True:
1130+
params["notifyUsers"] = "true"
1131+
else:
1132+
params["notifyUsers"] = "false"
1133+
11281134
if update_history is True:
11291135
params["updateHistory"] = "true"
11301136
else:

0 commit comments

Comments
 (0)