firebus / splunk-jira

A Splunk Add-on for JIRA
http://apps.splunk.com/app/1438/
Other
25 stars 15 forks source link

Changelog command fails when the Jira changelog contains a change made by "Anonymous" #34

Open emanuelhouse opened 7 years ago

emanuelhouse commented 7 years ago

Using the changelog command on a Jira issue which contains one or more changelog entries without an author will cause the changelog command to return 0 results:

| jira changelog key=SPL-128702

The above-mentioned Jira issue contains multiple entries in the changelog which show up in Jira as: Anonymous made changes...

When running the above command, these errors were observed in search.log:

03-22-2017 16:39:36.659 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/etc/apps/jira/bin/jira_rest.py changelog key=SPL-128702':  Traceback (most recent call last):
03-22-2017 16:39:36.659 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/etc/apps/jira/bin/jira_rest.py changelog key=SPL-128702':    File "/opt/splunk/etc/apps/jira/bin/jira_rest.py", line 440, in <module>
03-22-2017 16:39:36.659 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/etc/apps/jira/bin/jira_rest.py changelog key=SPL-128702':      row['user'] = field['author']['name']
03-22-2017 16:39:36.659 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/etc/apps/jira/bin/jira_rest.py changelog key=SPL-128702':  KeyError: 'author'
03-22-2017 16:39:36.669 WARN  ScriptRunner - Killing script, probably timed out, grace=0sec, script="/opt/splunk/bin/python /opt/splunk/etc/apps/jira/bin/jira_rest.py changelog key=SPL-128702"