1

Didn't find a Duplicate Issue for this and the notifiyUsers = False parameter was added in September 2016.

Docs:
https://jira.atlassian.com/browse/JRA-34423
http://jira.readthedocs.io/en/master/examples.html

I need to add labels to about 1700 tickets in our system. Sending out notification emails for that many tickets at once would be... politically unfavorable.

I can update the labels using the jira-python library, but when I set notify=False it returns an error. Working Code:

from jira import JIRA
host = "http://<site>.atlassian.net"
jira = JIRA(host,basic_auth=(<user>, <password>))
issue = jira.issue('ABC-1234')
issue.fields.labels.append(u'New_Label')
issue.update(fields={"labels": issue.fields.labels})

Changing the last line to:

issue.update(notify=False, fields={"labels": issue.fields.labels})

Results in error:

JIRAError: JiraError HTTP 400 url:

Python 3.5.2
Jupyter Notebook
Updated the Jira library using pip this morning
Jira Cloud version 1000.844.1

Community
  • 1
  • 1
gnfrazier
  • 51
  • 7
  • It would be nice if you could provide your current JIRA version. Would it be possible to disable notification during script execution? Other solution would be to use [bulk operation](https://confluence.atlassian.com/jiracoreserver073/editing-multiple-issues-at-the-same-time-861257342.html) in JIRA, so you can skip notifying users. – grundic Mar 22 '17 at 21:15
  • We are on cloud version JIRA v1000.844.1 Disabling notifications for this update may be the right work around. Long term I'll be automating the script to update labels based on keywords used in the summary or description. It would generate 1 extra mail per issue, still not ideal. – gnfrazier Mar 23 '17 at 12:54

1 Answers1

1

I think the documentation is wrong and this was never implemented. If you look at the code for Issue.update(), the comments explicitly say that kwargs are treated as field names and will get merged into the fields_dict (and the code reflects this). I think the easiest thing would be to add an explicit notifyUsers kwarg that will get sent with the payload.

darksideofthesun
  • 601
  • 2
  • 9
  • 19