Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit d832e5b

Browse files
Ignore support requests for which user data is removed when retrieving unresolved issues (#310)
* Ignore support requests for which user data is removed when retrieving unresolved issues. * added comment
1 parent db681f9 commit d832e5b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/NuGet.SupportRequests.Notifications/Job.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System;
55
using System.Collections.Generic;
66
using System.Threading.Tasks;
7-
using Microsoft.Extensions.Logging;
87
using NuGet.Jobs;
98

109
namespace NuGet.SupportRequests.Notifications

src/NuGet.SupportRequests.Notifications/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class Program
1010
public static void Main(string[] args)
1111
{
1212
var job = new Job();
13-
JobRunner.Run(job, args).Wait();
13+
JobRunner.Run(job, args).GetAwaiter().GetResult();
1414
}
1515
}
1616
}

src/NuGet.SupportRequests.Notifications/SqlQuery.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ internal static class SqlQuery
77
{
88
internal static string GetUnresolvedIssues(string onCallPagerDutyUserName = null)
99
{
10+
// If I.[CreatedBy] IS NULL, then the user data was deleted and the support request issue should be ignored.
1011
var query =
11-
"SELECT I.[CreatedBy], I.[CreatedDate], I.[PackageId], I.[PackageVersion], I.[OwnerEmail], I.[Reason], I.[PackageRegistrationKey], ISNULL(A.[PagerDutyUsername], \'Unassigned\') AS \'AdminPagerDutyUsername\', ISNULL(A.[GalleryUsername], \'Unassigned\') AS \'AdminGalleryUsername\', I.[IssueStatusId] AS \'IssueStatus\' FROM [dbo].[Issues] AS I (NOLOCK) LEFT OUTER JOIN [dbo].[Admins] AS A (NOLOCK) ON I.[AssignedToId] = A.[Key] WHERE I.[IssueStatusId] <> 3 ";
12+
"SELECT I.[CreatedBy], I.[CreatedDate], I.[PackageId], I.[PackageVersion], I.[OwnerEmail], I.[Reason], I.[PackageRegistrationKey], ISNULL(A.[PagerDutyUsername], \'Unassigned\') AS \'AdminPagerDutyUsername\', ISNULL(A.[GalleryUsername], \'Unassigned\') AS \'AdminGalleryUsername\', I.[IssueStatusId] AS \'IssueStatus\' FROM [dbo].[Issues] AS I (NOLOCK) LEFT OUTER JOIN [dbo].[Admins] AS A (NOLOCK) ON I.[AssignedToId] = A.[Key] WHERE I.[IssueStatusId] <> 3 AND I.[CreatedBy] IS NOT NULL";
1213

1314
if (!string.IsNullOrEmpty(onCallPagerDutyUserName))
1415
{

0 commit comments

Comments
 (0)