Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit ab189b1

Browse files
authored
Handle another duplicate field (#3383)
* Handle another duplicate field * Make case insensitive
1 parent dde7a09 commit ab189b1

File tree

1 file changed

+2
-1
lines changed
  • src/ApiService/ApiService/onefuzzlib/notifications

1 file changed

+2
-1
lines changed

src/ApiService/ApiService/onefuzzlib/notifications/Ado.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,8 @@ private static bool IsADODuplicateWorkItem(WorkItem wi) {
528528
// OR it could have System.State == Closed && System.Reason == Duplicate
529529
// I haven't found any other combinations where System.Reason could be duplicate but just to be safe
530530
// we're explicitly _not_ checking the state of the work item to determine if it's duplicate
531-
return wi.Fields.ContainsKey("System.Reason") && string.Equals(wi.Fields["System.Reason"].ToString(), "Duplicate")
531+
return wi.Fields.ContainsKey("System.Reason") && string.Equals(wi.Fields["System.Reason"].ToString(), "Duplicate", StringComparison.OrdinalIgnoreCase)
532+
|| wi.Fields.ContainsKey("Microsoft.VSTS.Common.ResolvedReason") && string.Equals(wi.Fields["Microsoft.VSTS.Common.ResolvedReason"].ToString(), "Duplicate", StringComparison.OrdinalIgnoreCase)
532533
// Alternatively, the work item can also specify a 'relation' to another work item.
533534
// This is typically used to create parent/child relationships between work items but can also
534535
// Be used to mark duplicates so we should check this as well.

0 commit comments

Comments
 (0)