From 82c6e5d419524e94903fe76dc3fe84af00292981 Mon Sep 17 00:00:00 2001 From: hblankenship Date: Tue, 19 Nov 2024 14:18:51 -0600 Subject: [PATCH 1/3] add username --- dojo/finding/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dojo/finding/views.py b/dojo/finding/views.py index 0c0d78d6cc5..90fd3d10e97 100644 --- a/dojo/finding/views.py +++ b/dojo/finding/views.py @@ -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 = f"({user.id}), ".join([str(user) for user in reviewers]) reviewers_usernames = [user.username for user in reviewers] logger.debug(f"Asking {reviewers_string} for review") @@ -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,)), ) From fdb8f8a8ac1dc19afa56f7468b68e68840434fc6 Mon Sep 17 00:00:00 2001 From: Cody Maffucci <46459665+Maffooch@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:29:43 -0600 Subject: [PATCH 2/3] Update dojo/finding/views.py --- dojo/finding/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dojo/finding/views.py b/dojo/finding/views.py index 90fd3d10e97..f3769b043b8 100644 --- a/dojo/finding/views.py +++ b/dojo/finding/views.py @@ -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 = f"({user.id}), ".join([str(user) for user in reviewers]) + reviewers_string = f", ".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") From 7c906097c7a85ebcf37578ff76d2bae4ebcac3d5 Mon Sep 17 00:00:00 2001 From: Cody Maffucci <46459665+Maffooch@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:47:33 -0600 Subject: [PATCH 3/3] Update dojo/finding/views.py --- dojo/finding/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dojo/finding/views.py b/dojo/finding/views.py index f3769b043b8..aa5e5db9253 100644 --- a/dojo/finding/views.py +++ b/dojo/finding/views.py @@ -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 = f", ".join([f"{user} ({user.id})" 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")