Skip to content

Commit

Permalink
Request Review Notification Update to Usernames (#11295)
Browse files Browse the repository at this point in the history
* add username

* Update dojo/finding/views.py

* Update dojo/finding/views.py

---------

Co-authored-by: Cody Maffucci <[email protected]>
  • Loading branch information
hblankenship and Maffooch authored Dec 3, 2024
1 parent 6c1d1d6 commit 100a52d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dojo/finding/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@ def request_finding_review(request, fid):
jira_helper.push_to_jira(finding.finding_group)

reviewers = Dojo_User.objects.filter(id__in=form.cleaned_data["reviewers"])
reviewers_string = ", ".join([str(user) for user in reviewers])
reviewers_string = ", ".join([f"{user} ({user.id})" for user in reviewers])
reviewers_usernames = [user.username for user in reviewers]
logger.debug(f"Asking {reviewers_string} for review")

Expand All @@ -1708,7 +1708,7 @@ def request_finding_review(request, fid):
finding=finding,
reviewers=reviewers,
recipients=reviewers_usernames,
description=f'User {user.get_full_name()} has requested that user(s) {reviewers_string} review the finding "{finding.title}" for accuracy:\n\n{new_note}',
description=f'User {user.get_full_name()}({user.id}) has requested that user(s) {reviewers_string} review the finding "{finding.title}" for accuracy:\n\n{new_note}',
icon="check",
url=reverse("view_finding", args=(finding.id,)),
)
Expand Down

0 comments on commit 100a52d

Please sign in to comment.