Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 9b7f5ab

Browse files
Merge pull request #1465 from beeerd/master
issue #1463: check assignee field to prevent null err
2 parents 7ed98bd + 3ed7322 commit 9b7f5ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/scripts/jira-issues.coffee

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ module.exports = (robot) ->
6767
message = "[" + key + "] " + json.fields.summary
6868
message += '\nStatus: '+json.fields.status.name
6969

70-
if ('value' of json.fields.assignee or 'displayName' of json.fields.assignee)
70+
if (json.fields.assignee == null)
71+
message += ', unassigned'
72+
else if ('value' of json.fields.assignee or 'displayName' of json.fields.assignee)
7173
if (json.fields.assignee.name == "assignee" and json.fields.assignee.value.displayName)
7274
message += ', assigned to ' + json.fields.assignee.value.displayName
7375
else if (json.fields.assignee and json.fields.assignee.displayName)

0 commit comments

Comments
 (0)