WS Result bug fix, Nuget bump, PSN, Reactor,
Extra RDS rule, OpenInsightApi and testRunTitle
This commit is contained in:
@ -85,11 +85,11 @@ public class ProcessData : IProcessData
|
||||
return results;
|
||||
}
|
||||
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments)
|
||||
private static (string, string) GetReactorAndRDS(string defaultReactor, string defaultRDS, string text, string formattedText, string[] segments, bool hasRDS)
|
||||
{
|
||||
string rds;
|
||||
string reactor;
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText))
|
||||
if (string.IsNullOrEmpty(text) || segments.Length == 0 || string.IsNullOrEmpty(formattedText) || (segments.Length > 1 && !hasRDS))
|
||||
reactor = defaultReactor;
|
||||
else
|
||||
reactor = segments[0];
|
||||
@ -105,11 +105,11 @@ public class ProcessData : IProcessData
|
||||
return new(reactor, rds);
|
||||
}
|
||||
|
||||
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments)
|
||||
private static (string, string) GetLayerAndPSN(string defaultLayer, string defaultPSN, string[] segments, bool hasRDS)
|
||||
{
|
||||
string psn;
|
||||
string layer;
|
||||
if (segments.Length <= 2)
|
||||
if (segments.Length <= 2 || (segments.Length > 1 && !hasRDS))
|
||||
{
|
||||
psn = defaultPSN;
|
||||
layer = defaultLayer;
|
||||
@ -193,8 +193,9 @@ public class ProcessData : IProcessData
|
||||
title = title.Substring(2);
|
||||
run = title;
|
||||
string[] segments = title.Split('-');
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, title, segments);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments);
|
||||
bool hasRDS = Regex.IsMatch(title, "[-]?[0-9]{5,}[-]?");
|
||||
(reactor, rds) = GetReactorAndRDS(defaultReactor, defaultRDS, text, title, segments, hasRDS);
|
||||
(layer, psn) = GetLayerAndPSN(defaultLayer, defaultPSN, segments, hasRDS);
|
||||
zone = GetZone(segments);
|
||||
employee = defaultEmployee;
|
||||
}
|
||||
|
Reference in New Issue
Block a user