diff --git a/src/Particular.LicensingComponent.UnitTests/ApprovalFiles/ThroughputCollector_Report_Throughput_Tests.Should_generate_correct_report.approved.txt b/src/Particular.LicensingComponent.UnitTests/ApprovalFiles/ThroughputCollector_Report_Throughput_Tests.Should_generate_correct_report.approved.txt index 1a2234c3e8..ef7900a1ea 100644 --- a/src/Particular.LicensingComponent.UnitTests/ApprovalFiles/ThroughputCollector_Report_Throughput_Tests.Should_generate_correct_report.approved.txt +++ b/src/Particular.LicensingComponent.UnitTests/ApprovalFiles/ThroughputCollector_Report_Throughput_Tests.Should_generate_correct_report.approved.txt @@ -120,7 +120,7 @@ "NameHash": "BBF022C092922A8B3A63455FC7583EAF35840E66F01B73AF997EACDCA8ABCEA4", "Throughput": 47, "EndpointIndicators": [], - "UserIndicator": "PlannedToDecommission", + "UserIndicator": "NServiceBusEndpoint", "Scope": "", "ScopeHash": "", "DailyThroughputFromBroker": [ diff --git a/src/Particular.LicensingComponent/ThroughputCollector.cs b/src/Particular.LicensingComponent/ThroughputCollector.cs index 945640ea10..ac4415a252 100644 --- a/src/Particular.LicensingComponent/ThroughputCollector.cs +++ b/src/Particular.LicensingComponent/ThroughputCollector.cs @@ -301,7 +301,12 @@ string CleanseSanitizedName(string endpointName) { return throughputQuery == null ? endpointName : throughputQuery.SanitizedEndpointNameCleanser(endpointName); } - static string? UserIndicator(IGrouping endpoint) => endpoint.FirstOrDefault(s => !string.IsNullOrEmpty(s.UserIndicator))?.UserIndicator; + static string? UserIndicator(IGrouping endpoint) => endpoint.FirstOrDefault(s => !string.IsNullOrEmpty(s.UserIndicator))?.UserIndicator switch + { + // HINT: PlannedToDecommission is a legacy value. Only endpoints would have been marked with this user indicator. + var userIndicator when userIndicator == Contracts.UserIndicator.PlannedToDecommission.ToString() => Contracts.UserIndicator.NServiceBusEndpoint.ToString(), + var userIndicator => userIndicator + }; static string? EndpointScope(IGrouping endpoint) => endpoint.FirstOrDefault(s => !string.IsNullOrEmpty(s.Scope))?.Scope;