From 78f398b59cff0df8d37909b87b2bb8bc016c8cbc Mon Sep 17 00:00:00 2001 From: Tanvir Patwary Date: Mon, 13 Jan 2025 10:16:15 -0500 Subject: [PATCH 1/2] Added comment Added a string checking if no comment was entered (not tested). --- src/AppServices/Notifications/NotificationService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/AppServices/Notifications/NotificationService.cs b/src/AppServices/Notifications/NotificationService.cs index 656887d2..f8a3ec7a 100644 --- a/src/AppServices/Notifications/NotificationService.cs +++ b/src/AppServices/Notifications/NotificationService.cs @@ -35,6 +35,7 @@ public async Task SendNotificationAsync(Template template, s baseUrl ??= string.Empty; var complaintUrl = $"{baseUrl}Staff/Complaints/Details/{complaint.Id}"; var subject = string.Format($"{subjectPrefix} {template.Subject}", complaint.Id.ToString()); + comment = string.IsNullOrWhiteSpace(comment) ? "No comment entered." : comment; var textBody = string.Format(template.TextBody + Template.TextSignature, complaint.Id.ToString(), complaintUrl, baseUrl, complaint.CurrentOffice.Name, comment); var htmlBody = string.Format(template.HtmlBody + Template.HtmlSignature, complaint.Id.ToString(), From 14286d5d4bc537abb25b614147093dffc59044f4 Mon Sep 17 00:00:00 2001 From: Doug Waldron Date: Tue, 4 Feb 2025 13:36:31 -0500 Subject: [PATCH 2/2] Update empty comment replacement text --- src/AppServices/Notifications/NotificationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AppServices/Notifications/NotificationService.cs b/src/AppServices/Notifications/NotificationService.cs index f8a3ec7a..3e792107 100644 --- a/src/AppServices/Notifications/NotificationService.cs +++ b/src/AppServices/Notifications/NotificationService.cs @@ -35,7 +35,7 @@ public async Task SendNotificationAsync(Template template, s baseUrl ??= string.Empty; var complaintUrl = $"{baseUrl}Staff/Complaints/Details/{complaint.Id}"; var subject = string.Format($"{subjectPrefix} {template.Subject}", complaint.Id.ToString()); - comment = string.IsNullOrWhiteSpace(comment) ? "No comment entered." : comment; + comment = string.IsNullOrWhiteSpace(comment) ? "[No comment entered.]" : comment; var textBody = string.Format(template.TextBody + Template.TextSignature, complaint.Id.ToString(), complaintUrl, baseUrl, complaint.CurrentOffice.Name, comment); var htmlBody = string.Format(template.HtmlBody + Template.HtmlSignature, complaint.Id.ToString(),