Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix create notification for group of findings #10433

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions dojo/jira_link/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,10 @@ def check_for_and_create_comment(parsed_json):
findings = [jissue.finding]
create_notification(event='jira_comment', title=f'JIRA incoming comment - {jissue.finding}', finding=jissue.finding, url=reverse("view_finding", args=(jissue.finding.id,)), icon='check')
elif jissue.finding_group:
findings = [jissue.finding_group.findings.all()]
create_notification(event='jira_comment', title=f'JIRA incoming comment - {jissue.finding}', finding=jissue.finding, url=reverse("view_finding_group", args=(jissue.finding_group.id,)), icon='check')
findings = jissue.finding_group.findings.all()
first_finding_group = findings.first()
if first_finding_group:
create_notification(event='jira_comment', title=f'JIRA incoming comment - {jissue.finding_group}', finding=first_finding_group, url=reverse("view_finding_group", args=(jissue.finding_group.id,)), icon='check')
elif jissue.engagement:
return webhook_responser_handler("debug", "Comment for engagement ignored")
else:
Expand Down
Loading