Skip to content

Commit 70b8ece

Browse files
Fix assignee bug in JIRA view (DefectDojo#6741)
* Fix assignee bug in JIRA view * Update dojo/jira_link/views.py Co-authored-by: Cody Maffucci <[email protected]> Co-authored-by: Cody Maffucci <[email protected]>
1 parent 9d282e0 commit 70b8ece

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dojo/jira_link/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def webhook(request, secret=None):
7777
raise Http404('No finding, finding_group or engagement found for JIRA issue {}'.format(jissue.jira_key))
7878

7979
assignee = parsed['issue']['fields'].get('assignee')
80-
assignee_name = assignee['name'] if assignee else None
80+
# First look for the 'name' field. If not present, try 'displayName'. Else put None
81+
assignee_name = assignee.get('name', assignee.get('displayName'))
8182

8283
resolution = parsed['issue']['fields']['resolution']
8384

0 commit comments

Comments
 (0)