Moved Development to Production

Moved Markdown to new Connection
Better header for html
This commit is contained in:
Mike Phares 2024-10-07 15:47:11 -07:00
parent 41933b98d2
commit 3977727168
21 changed files with 7582 additions and 552 deletions

View File

@ -20,6 +20,7 @@ public class CellInstanceConnectionName
nameof(IQSSi) => new IQSSi.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(json) => new json.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(Kanban) => new Kanban.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(Markdown) => new Markdown.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(MoveMatchingFiles) => new MoveMatchingFiles.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(OpenInsight) => new OpenInsight.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),
nameof(OpenInsightMetrologyViewer) => new OpenInsightMetrologyViewer.FileRead(smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null),

View File

@ -0,0 +1,478 @@
using Adaptation.Eaf.Management.ConfigurationData.CellAutomation;
using Adaptation.FileHandlers.json.WorkItems;
using Adaptation.Ifx.Eaf.EquipmentConnector.File.Configuration;
using Adaptation.Shared;
using Adaptation.Shared.Duplicator;
using Adaptation.Shared.Methods;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text.Json;
namespace Adaptation.FileHandlers.Markdown;
public class FileRead : Shared.FileRead, IFileRead
{
private readonly string _URL;
private readonly ReadOnlyCollection<string> _WorkItemTypes;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
{
_MinFileLength = 10;
_NullData = string.Empty;
_Logistics = new(this);
if (_FileParameter is null)
throw new Exception(cellInstanceConnectionName);
if (_ModelObjectParameterDefinitions is null)
throw new Exception(cellInstanceConnectionName);
if (!_IsDuplicator)
throw new Exception(cellInstanceConnectionName);
string cellInstanceNamed = string.Concat("CellInstance.", _EquipmentType);
_URL = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, $"{cellInstanceNamed}.URL");
string workItemTypes = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, $"{cellInstanceNamed}.WorkItemTypes");
_WorkItemTypes = new(workItemTypes.Split('|'));
NestExistingFiles(_FileConnectorConfiguration);
}
void IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, Exception exception) => Move(extractResults);
void IFileRead.WaitForThread() => WaitForThread(thread: null, threadExceptions: null);
string IFileRead.GetEventDescription()
{
string result = _Description.GetEventDescription();
return result;
}
List<string> IFileRead.GetHeaderNames()
{
List<string> results = _Description.GetHeaderNames();
return results;
}
string[] IFileRead.Move(Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResults, string to, string from, string resolvedFileLocation, Exception exception)
{
string[] results = Move(extractResults, to, from, resolvedFileLocation, exception);
return results;
}
JsonProperty[] IFileRead.GetDefault()
{
JsonProperty[] results = _Description.GetDefault(this, _Logistics);
return results;
}
Dictionary<string, string> IFileRead.GetDisplayNamesJsonElement()
{
Dictionary<string, string> results = _Description.GetDisplayNamesJsonElement(this);
return results;
}
List<IDescription> IFileRead.GetDescriptions(IFileRead fileRead, List<Test> tests, IProcessData processData)
{
List<IDescription> results = _Description.GetDescriptions(fileRead, _Logistics, tests, processData);
return results;
}
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.GetExtractResult(string reportFullPath, string eventName)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
if (string.IsNullOrEmpty(eventName))
throw new Exception();
_ReportFullPath = reportFullPath;
DateTime dateTime = DateTime.Now;
results = GetExtractResult(reportFullPath, dateTime);
if (results.Item3 is null)
results = new Tuple<string, Test[], JsonElement[], List<FileInfo>>(results.Item1, Array.Empty<Test>(), JsonSerializer.Deserialize<JsonElement[]>("[]"), results.Item4);
if (results.Item3.Length > 0 && _IsEAFHosted)
WritePDSF(this, results.Item3);
UpdateLastTicksDuration(DateTime.Now.Ticks - dateTime.Ticks);
return results;
}
Tuple<string, Test[], JsonElement[], List<FileInfo>> IFileRead.ReExtract()
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
List<string> headerNames = _Description.GetHeaderNames();
Dictionary<string, string> keyValuePairs = _Description.GetDisplayNamesJsonElement(this);
results = ReExtract(this, headerNames, keyValuePairs);
return results;
}
#nullable enable
private static ReadOnlyDictionary<int, WorkItem> GetWorkItems(ReadOnlyCollection<WorkItem> workItems)
{
Dictionary<int, WorkItem> results = new();
foreach (WorkItem workItem in workItems)
results.Add(workItem.Id, workItem);
return new(results);
}
private static int? GetIdFromUrlIfChild(Relation relation)
{
int? result;
string[] segments = relation?.Attributes is null || relation.Attributes.Name != "Child" ? Array.Empty<string>() : relation.URL.Split('/');
if (segments.Length < 2)
result = null;
else
{
if (!int.TryParse(segments[segments.Length - 1], out int id))
result = null;
else
result = id;
}
return result;
}
private static Dictionary<int, Record> GetKeyValuePairs(ReadOnlyDictionary<int, WorkItem> workItems, WorkItem workItem)
{
Dictionary<int, Record> results = new();
int? childId;
WorkItem? childWorkItem;
List<WorkItem> collection = new();
Dictionary<int, Record> keyValuePairs;
if (workItem.Relations is not null && workItem.Relations.Length > 0)
{
collection.Clear();
foreach (Relation relation in workItem.Relations)
{
childId = GetIdFromUrlIfChild(relation);
if (childId is null || !workItems.TryGetValue(childId.Value, out childWorkItem))
continue;
collection.Add(childWorkItem);
}
collection = (from l in collection orderby l.State != "Closed", l.Id select l).ToList();
foreach (WorkItem item in collection)
{
keyValuePairs = GetKeyValuePairs(workItems, item);
results.Add(item.Id, new(item, new(keyValuePairs)));
}
}
return results;
}
private static ReadOnlyDictionary<int, Record> GetWorkItemAndChildren(ReadOnlyDictionary<int, WorkItem> workItems)
{
Dictionary<int, Record> results = new();
Dictionary<int, Record> keyValuePairs;
foreach (KeyValuePair<int, WorkItem> keyValuePair in workItems)
{
// if (keyValuePair.Key != 119185)
// continue;
keyValuePairs = GetKeyValuePairs(workItems, keyValuePair.Value);
results.Add(keyValuePair.Key, new(keyValuePair.Value, new(keyValuePairs)));
}
return new(results);
}
private static string GetClosed(WorkItem workItem)
{
string result = workItem.State != "Closed" ? "[ ]" : "[x]";
return result;
}
private static string GetLine(List<char> spaces, WorkItem workItem, KeyValuePair<int, Record> keyValuePair, bool condensed, bool sprintOnly) =>
sprintOnly ? $"\t- [ ] {workItem.IterationPath}" :
condensed ? $"{new string(spaces.Skip(1).ToArray())}- {GetClosed(workItem)} {keyValuePair.Key} - {workItem.Title}" :
$"{new string(spaces.Skip(1).ToArray())}- {GetClosed(workItem)} {keyValuePair.Key} - {workItem.Title} ~~~ {workItem.AssignedTo} - {workItem.IterationPath.Replace('\\', '-')} - {workItem.CreatedDate} --- {workItem.ClosedDate}";
private static void AppendLines(List<char> spaces, List<string> lines, Record record, bool condensed, bool sprintOnly)
{
string line;
spaces.Add('\t');
WorkItem workItem;
foreach (KeyValuePair<int, Record> keyValuePair in record.Children)
{
workItem = keyValuePair.Value.WorkItem;
line = GetLine(spaces, workItem, keyValuePair, condensed, sprintOnly).TrimEnd();
lines.Add(line);
AppendLines(spaces, lines, keyValuePair.Value, condensed, sprintOnly);
}
spaces.RemoveAt(0);
}
private static void AppendLines(string url, List<char> spaces, List<string> lines, ReadOnlyDictionary<int, Record> workItemAndChildren, string workItemType)
{
List<string> results = new();
WorkItem workItem;
string? maxIterationPath;
List<string> distinct = new();
foreach (KeyValuePair<int, Record> keyValuePair in workItemAndChildren)
{
workItem = keyValuePair.Value.WorkItem;
// if (keyValuePair.Key != 109724)
// continue;
if (workItem.WorkItemType != workItemType)
continue;
results.Add($"## {workItem.AssignedTo} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
results.Add($"- [{workItem.Id}]({url}{workItem.Id})");
if (keyValuePair.Value.Children.Count == 0)
results.Add(string.Empty);
else
{
AppendLines(spaces, results, keyValuePair.Value, condensed: true, sprintOnly: false);
results.Add(string.Empty);
distinct.Clear();
AppendLines(spaces, distinct, keyValuePair.Value, condensed: false, sprintOnly: true);
if (distinct.Count > 1)
{
results.Add($"## Distinct Iteration Path(s) - {workItem.WorkItemType} - {workItem.AssignedTo} - {workItem.Id} - {workItem.Title} - {workItem.IterationPath}");
results.Add(string.Empty);
results.Add($"- [{workItem.Id}]({url}{workItem.Id})");
distinct.Sort();
distinct = (from l in distinct select l.Trim()).Distinct().ToList();
results.AddRange(distinct);
results.Add(string.Empty);
maxIterationPath = distinct.Max();
if (!string.IsNullOrEmpty(maxIterationPath) && maxIterationPath.Contains("] ") && maxIterationPath.Split(']')[1].Trim() != workItem.IterationPath)
{
results.Add($"### Sync to Distinct Max Iteration Path => {maxIterationPath} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
}
}
results.Add($"## Extended - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
AppendLines(spaces, results, keyValuePair.Value, condensed: false, sprintOnly: false);
results.Add(string.Empty);
}
lines.AddRange(results);
results.Clear();
}
}
private static void WriteFiles(string destinationDirectory, string fileName, ReadOnlyCollection<string> lines)
{
string text = string.Join(Environment.NewLine, lines);
string markdownFile = Path.Combine(destinationDirectory, $"{fileName}.md");
string textOld = !File.Exists(markdownFile) ? string.Empty : File.ReadAllText(markdownFile);
if (text != textOld)
File.WriteAllText(markdownFile, text);
string html = CommonMark.CommonMarkConverter.Convert(text).Replace("<a href", "<a target='_blank' href");
string htmlFile = Path.Combine(destinationDirectory, $"{fileName}.html");
string htmlOld = !File.Exists(htmlFile) ? string.Empty : File.ReadAllText(htmlFile);
if (html != htmlOld)
File.WriteAllText(htmlFile, html);
}
private static ReadOnlyCollection<WorkItem> FilterChildren(Record record, ReadOnlyCollection<string> workItemTypes)
{
List<WorkItem> results = new();
WorkItem workItem;
foreach (KeyValuePair<int, Record> keyValuePair in record.Children)
{
workItem = keyValuePair.Value.WorkItem;
if (!workItemTypes.Contains(workItem.WorkItemType))
continue;
results.Add(workItem);
}
return new(results);
}
private static string? GetMaxIterationPath(ReadOnlyCollection<WorkItem> workItems)
{
string? result;
List<string> results = new();
foreach (WorkItem workItem in workItems)
{
if (results.Contains(workItem.IterationPath))
continue;
results.Add(workItem.IterationPath);
}
result = results.Count == 0 ? null : results.Max();
return result;
}
private static void FeatureCheckIterationPath(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> workItemAndChildren, string workItemType)
{
WorkItem workItem;
string? maxIterationPath;
List<string> results = new();
ReadOnlyCollection<WorkItem> workItems;
foreach (KeyValuePair<int, Record> keyValuePair in workItemAndChildren)
{
workItem = keyValuePair.Value.WorkItem;
if (workItem.WorkItemType != workItemType)
continue;
results.Clear();
if (keyValuePair.Value.Children.Count == 0)
continue;
workItems = FilterChildren(keyValuePair.Value, workItemTypes);
maxIterationPath = GetMaxIterationPath(workItems);
if (string.IsNullOrEmpty(maxIterationPath) || workItem.IterationPath == maxIterationPath)
continue;
results.Add($"## {workItem.AssignedTo} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
results.Add($"- [ ] [{workItem.Id}]({url}{workItem.Id}) => {workItem.IterationPath} != {maxIterationPath}");
results.Add(string.Empty);
lines.AddRange(results);
}
}
private static ReadOnlyCollection<int> GetIdsNotMatching(string tags, ReadOnlyCollection<WorkItem> workItems)
{
List<int> results = new();
string[] segments;
string[] parentTags = tags.Split(';');
foreach (WorkItem workItem in workItems)
{
segments = tags.Split(';');
if (segments.Length > 0 && parentTags.Any(l => segments.Contains(l)))
continue;
results.Add(workItem.Id);
}
return new(results);
}
private static void FeatureCheckTag(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> workItemAndChildren, string workItemType)
{
WorkItem workItem;
List<string> results = new();
ReadOnlyCollection<int> idsNotMatching;
ReadOnlyCollection<WorkItem> workItems;
foreach (KeyValuePair<int, Record> keyValuePair in workItemAndChildren)
{
workItem = keyValuePair.Value.WorkItem;
if (workItem.WorkItemType != workItemType)
continue;
results.Clear();
if (keyValuePair.Value.Children.Count == 0)
continue;
if (string.IsNullOrEmpty(workItem.Tags))
idsNotMatching = new(new int[] { workItem.Id });
else
{
workItems = FilterChildren(keyValuePair.Value, workItemTypes);
idsNotMatching = GetIdsNotMatching(workItem.Tags, workItems);
if (!string.IsNullOrEmpty(workItem.Tags) && idsNotMatching.Count == 0)
continue;
}
results.Add($"## {workItem.AssignedTo} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
foreach (int id in idsNotMatching)
results.Add($"- [ ] [{id}]({url}{id}) {nameof(workItem.Tags)} != {workItem.Tags}");
results.Add(string.Empty);
lines.AddRange(results);
}
}
private static ReadOnlyCollection<int> GetIdsNotMatching(int? priority, ReadOnlyCollection<WorkItem> workItems)
{
List<int> results = new();
foreach (WorkItem workItem in workItems)
{
if (workItem.Priority == priority)
continue;
results.Add(workItem.Id);
}
return new(results);
}
private static void FeatureCheckPriority(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> workItemAndChildren, string workItemType)
{
WorkItem workItem;
List<string> results = new();
ReadOnlyCollection<int> idsNotMatching;
ReadOnlyCollection<WorkItem> workItems;
foreach (KeyValuePair<int, Record> keyValuePair in workItemAndChildren)
{
workItem = keyValuePair.Value.WorkItem;
if (workItem.WorkItemType != workItemType)
continue;
results.Clear();
if (keyValuePair.Value.Children.Count == 0)
continue;
workItems = FilterChildren(keyValuePair.Value, workItemTypes);
idsNotMatching = GetIdsNotMatching(workItem.Priority, workItems);
if (idsNotMatching.Count == 0)
continue;
results.Add($"## {workItem.AssignedTo} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
results.Add($"- [{workItem.Id}]({url}{workItem.Id})");
foreach (int id in idsNotMatching)
results.Add($"- [ ] [{id}]({url}{id}) {nameof(workItem.Priority)} != {workItem.Priority}");
results.Add(string.Empty);
lines.AddRange(results);
}
}
private static void WriteFiles(FileConnectorConfiguration fileConnectorConfiguration, string url, ReadOnlyCollection<string> workItemTypes, ReadOnlyCollection<WorkItem> workItems)
{
string json;
List<char> spaces = new();
List<string> lines = new();
ReadOnlyDictionary<int, WorkItem> keyValuePairs = GetWorkItems(workItems);
ReadOnlyDictionary<int, Record> workItemAndChildren = GetWorkItemAndChildren(keyValuePairs);
ReadOnlyCollection<string> bugUserStoryWorkItemTypes = new(new string[] { "Bug", "User Story" });
ReadOnlyCollection<string> bugUserStoryTaskWorkItemTypes = new(new string[] { "Bug", "User Story", "Task" });
if (!Directory.Exists(fileConnectorConfiguration.TargetFileLocation))
_ = Directory.CreateDirectory(fileConnectorConfiguration.TargetFileLocation);
if (workItemAndChildren.Count == -1)
{
json = JsonSerializer.Serialize(workItemAndChildren, new JsonSerializerOptions() { WriteIndented = true });
File.WriteAllText(Path.Combine(fileConnectorConfiguration.TargetFileLocation, ".json"), json);
}
foreach (string workItemType in workItemTypes)
{
lines.Clear();
lines.Add($"# {workItemType}");
lines.Add(string.Empty);
AppendLines(url, spaces, lines, workItemAndChildren, workItemType);
WriteFiles(fileConnectorConfiguration.TargetFileLocation, workItemType, new(lines));
}
{
lines.Clear();
string workItemType = "Feature";
lines.Add($"# {nameof(FeatureCheckIterationPath)}");
lines.Add(string.Empty);
FeatureCheckIterationPath(url, lines, bugUserStoryTaskWorkItemTypes, workItemAndChildren, workItemType);
WriteFiles(fileConnectorConfiguration.TargetFileLocation, $"{nameof(FeatureCheckIterationPath)}", new(lines));
}
{
lines.Clear();
string workItemType = "Feature";
lines.Add($"# {nameof(FeatureCheckTag)}");
lines.Add(string.Empty);
FeatureCheckTag(url, lines, bugUserStoryWorkItemTypes, workItemAndChildren, workItemType);
WriteFiles(fileConnectorConfiguration.TargetFileLocation, $"{nameof(FeatureCheckTag)}", new(lines));
}
{
lines.Clear();
string workItemType = "Feature";
lines.Add($"# {nameof(FeatureCheckPriority)}");
lines.Add(string.Empty);
FeatureCheckPriority(url, lines, bugUserStoryWorkItemTypes, workItemAndChildren, workItemType);
WriteFiles(fileConnectorConfiguration.TargetFileLocation, $"{nameof(FeatureCheckPriority)}", new(lines));
}
}
#pragma warning disable IDE0060
private void WriteFiles(string reportFullPath, DateTime dateTime)
#pragma warning restore IDE0060
{
string json = File.ReadAllText(reportFullPath);
WorkItem[]? workItems = JsonSerializer.Deserialize<WorkItem[]>(json);
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(reportFullPath);
if (workItems is null)
throw new Exception(nameof(workItems));
string[] alternateTargetFolders = _FileConnectorConfiguration.AlternateTargetFolder.Split('|');
if (workItems.Length > 0)
WriteFiles(_FileConnectorConfiguration, _URL, _WorkItemTypes, new(workItems));
}
private Tuple<string, Test[], JsonElement[], List<FileInfo>> GetExtractResult(string reportFullPath, DateTime dateTime)
{
Tuple<string, Test[], JsonElement[], List<FileInfo>> results;
_Logistics = new Logistics(reportFullPath, $"LOGISTICS_1{'\t'}A_JOBID={"BACKLOG"};A_MES_ENTITY={"BACKLOG"};");
if (_IsEAFHosted)
WriteFiles(reportFullPath, dateTime);
results = new(_Logistics.Logistics1[0], Array.Empty<Test>(), Array.Empty<JsonElement>(), new List<FileInfo>());
return results;
}
}

View File

@ -18,9 +18,7 @@ namespace Adaptation.FileHandlers.json;
public class FileRead : Shared.FileRead, IFileRead
{
private readonly string _URL;
private readonly Timer _Timer;
private readonly ReadOnlyCollection<string> _WorkItemTypes;
public FileRead(ISMTP smtp, Dictionary<string, string> fileParameter, string cellInstanceName, int? connectionCount, string cellInstanceConnectionName, FileConnectorConfiguration fileConnectorConfiguration, string equipmentTypeName, string parameterizedModelObjectDefinitionType, IList<ModelObjectParameterDefinition> modelObjectParameters, string equipmentDictionaryName, Dictionary<string, List<long>> dummyRuns, Dictionary<long, List<string>> staticRuns, bool useCyclicalForDescription, bool isEAFHosted) :
base(new Description(), false, smtp, fileParameter, cellInstanceName, connectionCount, cellInstanceConnectionName, fileConnectorConfiguration, equipmentTypeName, parameterizedModelObjectDefinitionType, modelObjectParameters, equipmentDictionaryName, dummyRuns, staticRuns, useCyclicalForDescription, isEAFHosted: connectionCount is null)
@ -34,10 +32,6 @@ public class FileRead : Shared.FileRead, IFileRead
throw new Exception(cellInstanceConnectionName);
if (_IsDuplicator)
throw new Exception(cellInstanceConnectionName);
string cellInstanceNamed = string.Concat("CellInstance.", _EquipmentType);
_URL = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, $"{cellInstanceNamed}.URL");
string workItemTypes = GetPropertyValue(cellInstanceConnectionName, modelObjectParameters, $"{cellInstanceNamed}.WorkItemTypes");
_WorkItemTypes = new(workItemTypes.Split('|'));
NestExistingFiles(_FileConnectorConfiguration);
if (!Debugger.IsAttached && fileConnectorConfiguration.PreProcessingMode != FileConnectorConfiguration.PreProcessingModeEnum.Process)
_Timer = new Timer(Callback, null, (int)(fileConnectorConfiguration.FileScanningIntervalInSeconds * 1000), Timeout.Infinite);
@ -115,37 +109,6 @@ public class FileRead : Shared.FileRead, IFileRead
#nullable enable
private static void ParseWorkItemsAsync(FileConnectorConfiguration fileConnectorConfiguration, string[] alternateTargetFolders, ReadOnlyCollection<WorkItem> workItems)
{
string old;
string checkFile;
string? pathRoot;
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
string json = JsonSerializer.Serialize(workItems, jsonSerializerOptions);
foreach (string alternateTargetFolder in alternateTargetFolders)
{
if (alternateTargetFolder == fileConnectorConfiguration.TargetFileLocation)
continue;
pathRoot = Path.GetPathRoot(alternateTargetFolder);
if (string.IsNullOrEmpty(pathRoot))
continue;
try
{
if (!Directory.Exists(pathRoot))
continue;
}
catch (Exception)
{ continue; }
if (!Directory.Exists(alternateTargetFolder))
_ = Directory.CreateDirectory(alternateTargetFolder);
checkFile = Path.Combine(alternateTargetFolder, fileConnectorConfiguration.TargetFileName);
old = !File.Exists(checkFile) ? string.Empty : File.ReadAllText(checkFile);
if (old == json)
continue;
File.WriteAllText(checkFile, json);
}
}
private static ReadOnlyCollection<WorkItem> GetWorkItems(ReadOnlyCollection<Value> valueWithReqCollection)
{
List<WorkItem> results = new();
@ -201,314 +164,13 @@ public class FileRead : Shared.FileRead, IFileRead
return new(results);
}
private static ReadOnlyDictionary<int, WorkItem> GetWorkItems(ReadOnlyCollection<WorkItem> workItems)
private static void WriteCollectionJson(FileConnectorConfiguration fileConnectorConfiguration, string[] alternateTargetFolders, ReadOnlyCollection<WorkItem> workItems)
{
Dictionary<int, WorkItem> results = new();
foreach (WorkItem workItem in workItems)
results.Add(workItem.Id, workItem);
return new(results);
}
private static int? GetIdFromUrlIfChild(Relation relation)
{
int? result;
string[] segments = relation?.Attributes is null || relation.Attributes.Name != "Child" ? Array.Empty<string>() : relation.URL.Split('/');
if (segments.Length < 2)
result = null;
else
{
if (!int.TryParse(segments[segments.Length - 1], out int id))
result = null;
else
result = id;
}
return result;
}
private static Dictionary<int, Record> GetKeyValuePairs(ReadOnlyDictionary<int, WorkItem> workItems, WorkItem workItem)
{
Dictionary<int, Record> results = new();
int? childId;
WorkItem? childWorkItem;
List<WorkItem> collection = new();
Dictionary<int, Record> keyValuePairs;
if (workItem.Relations is not null && workItem.Relations.Length > 0)
{
collection.Clear();
foreach (Relation relation in workItem.Relations)
{
childId = GetIdFromUrlIfChild(relation);
if (childId is null || !workItems.TryGetValue(childId.Value, out childWorkItem))
continue;
collection.Add(childWorkItem);
}
collection = (from l in collection orderby l.State != "Closed", l.Id select l).ToList();
foreach (WorkItem item in collection)
{
keyValuePairs = GetKeyValuePairs(workItems, item);
results.Add(item.Id, new(item, new(keyValuePairs)));
}
}
return results;
}
private static ReadOnlyDictionary<int, Record> GetWorkItemAndChildren(ReadOnlyDictionary<int, WorkItem> workItems)
{
Dictionary<int, Record> results = new();
Dictionary<int, Record> keyValuePairs;
foreach (KeyValuePair<int, WorkItem> keyValuePair in workItems)
{
// if (keyValuePair.Key != 119185)
// continue;
keyValuePairs = GetKeyValuePairs(workItems, keyValuePair.Value);
results.Add(keyValuePair.Key, new(keyValuePair.Value, new(keyValuePairs)));
}
return new(results);
}
private static string GetClosed(WorkItem workItem)
{
string result = workItem.State != "Closed" ? "[ ]" : "[x]";
return result;
}
private static string GetLine(List<char> spaces, WorkItem workItem, KeyValuePair<int, Record> keyValuePair, bool condensed, bool sprintOnly) =>
sprintOnly ? $"\t- [ ] {workItem.IterationPath}" :
condensed ? $"{new string(spaces.Skip(1).ToArray())}- {GetClosed(workItem)} {keyValuePair.Key} - {workItem.Title}" :
$"{new string(spaces.Skip(1).ToArray())}- {GetClosed(workItem)} {keyValuePair.Key} - {workItem.Title} ~~~ {workItem.AssignedTo} - {workItem.IterationPath.Replace('\\', '-')} - {workItem.CreatedDate} --- {workItem.ClosedDate}";
private static void AppendLines(List<char> spaces, List<string> lines, Record record, bool condensed, bool sprintOnly)
{
string line;
spaces.Add('\t');
WorkItem workItem;
foreach (KeyValuePair<int, Record> keyValuePair in record.Children)
{
workItem = keyValuePair.Value.WorkItem;
line = GetLine(spaces, workItem, keyValuePair, condensed, sprintOnly).TrimEnd();
lines.Add(line);
AppendLines(spaces, lines, keyValuePair.Value, condensed, sprintOnly);
}
spaces.RemoveAt(0);
}
private static void AppendLines(string url, List<char> spaces, List<string> lines, ReadOnlyDictionary<int, Record> workItemAndChildren, string workItemType)
{
List<string> results = new();
WorkItem workItem;
string? maxIterationPath;
List<string> distinct = new();
foreach (KeyValuePair<int, Record> keyValuePair in workItemAndChildren)
{
workItem = keyValuePair.Value.WorkItem;
// if (keyValuePair.Key != 109724)
// continue;
if (workItem.WorkItemType != workItemType)
continue;
results.Add($"## {workItem.AssignedTo} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
results.Add($"- [{workItem.Id}]({url}{workItem.Id})");
if (keyValuePair.Value.Children.Count == 0)
results.Add(string.Empty);
else
{
AppendLines(spaces, results, keyValuePair.Value, condensed: true, sprintOnly: false);
results.Add(string.Empty);
distinct.Clear();
AppendLines(spaces, distinct, keyValuePair.Value, condensed: false, sprintOnly: true);
if (distinct.Count > 1)
{
results.Add($"## Distinct Iteration Path(s) - {workItem.WorkItemType} - {workItem.AssignedTo} - {workItem.Id} - {workItem.Title} - {workItem.IterationPath}");
results.Add(string.Empty);
results.Add($"- [{workItem.Id}]({url}{workItem.Id})");
distinct.Sort();
distinct = (from l in distinct select l.Trim()).Distinct().ToList();
results.AddRange(distinct);
results.Add(string.Empty);
maxIterationPath = distinct.Max();
if (!string.IsNullOrEmpty(maxIterationPath) && maxIterationPath.Contains("] ") && maxIterationPath.Split(']')[1].Trim() != workItem.IterationPath)
{
results.Add($"### Sync to Distinct Max Iteration Path => {maxIterationPath} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
}
}
results.Add($"## Extended - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
AppendLines(spaces, results, keyValuePair.Value, condensed: false, sprintOnly: false);
results.Add(string.Empty);
}
lines.AddRange(results);
results.Clear();
}
}
private static void WriteFiles(string destinationDirectory, string fileName, ReadOnlyCollection<string> lines)
{
string text = string.Join(Environment.NewLine, lines);
string markdownFile = Path.Combine(destinationDirectory, $"{fileName}.md");
string textOld = !File.Exists(markdownFile) ? string.Empty : File.ReadAllText(markdownFile);
if (text != textOld)
File.WriteAllText(markdownFile, text);
string html = CommonMark.CommonMarkConverter.Convert(text);
string htmlFile = Path.Combine(destinationDirectory, $"{fileName}.html");
string htmlOld = !File.Exists(htmlFile) ? string.Empty : File.ReadAllText(htmlFile);
if (html != htmlOld)
File.WriteAllText(htmlFile, html);
}
private static ReadOnlyCollection<WorkItem> FilterChildren(Record record, ReadOnlyCollection<string> workItemTypes)
{
List<WorkItem> results = new();
WorkItem workItem;
foreach (KeyValuePair<int, Record> keyValuePair in record.Children)
{
workItem = keyValuePair.Value.WorkItem;
if (!workItemTypes.Contains(workItem.WorkItemType))
continue;
results.Add(workItem);
}
return new(results);
}
private static string? GetMaxIterationPath(ReadOnlyCollection<WorkItem> workItems)
{
string? result;
List<string> results = new();
foreach (WorkItem workItem in workItems)
{
if (results.Contains(workItem.IterationPath))
continue;
results.Add(workItem.IterationPath);
}
result = results.Count == 0 ? null : results.Max();
return result;
}
private static void FeatureCheckIterationPath(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> workItemAndChildren, string workItemType)
{
WorkItem workItem;
string? maxIterationPath;
List<string> results = new();
ReadOnlyCollection<WorkItem> workItems;
foreach (KeyValuePair<int, Record> keyValuePair in workItemAndChildren)
{
workItem = keyValuePair.Value.WorkItem;
if (workItem.WorkItemType != workItemType)
continue;
results.Clear();
if (keyValuePair.Value.Children.Count == 0)
continue;
workItems = FilterChildren(keyValuePair.Value, workItemTypes);
maxIterationPath = GetMaxIterationPath(workItems);
if (string.IsNullOrEmpty(maxIterationPath) || workItem.IterationPath == maxIterationPath)
continue;
results.Add($"## {workItem.AssignedTo} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
results.Add($"- [{workItem.Id}]({url}{workItem.Id})");
results.Add($"- [ ] {workItem.Id} => {workItem.IterationPath} != {maxIterationPath}");
results.Add(string.Empty);
lines.AddRange(results);
}
}
private static ReadOnlyCollection<int> GetIdsNotMatching(string tags, ReadOnlyCollection<WorkItem> workItems)
{
List<int> results = new();
string[] segments;
string[] parentTags = tags.Split(';');
foreach (WorkItem workItem in workItems)
{
segments = tags.Split(';');
if (segments.Length > 0 && parentTags.Any(l => segments.Contains(l)))
continue;
results.Add(workItem.Id);
}
return new(results);
}
private static void FeatureCheckTag(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> workItemAndChildren, string workItemType)
{
WorkItem workItem;
List<string> results = new();
ReadOnlyCollection<int> idsNotMatching;
ReadOnlyCollection<WorkItem> workItems;
foreach (KeyValuePair<int, Record> keyValuePair in workItemAndChildren)
{
workItem = keyValuePair.Value.WorkItem;
if (workItem.WorkItemType != workItemType)
continue;
results.Clear();
if (keyValuePair.Value.Children.Count == 0)
continue;
if (string.IsNullOrEmpty(workItem.Tags))
idsNotMatching = new(new int[] { workItem.Id });
else
{
workItems = FilterChildren(keyValuePair.Value, workItemTypes);
idsNotMatching = GetIdsNotMatching(workItem.Tags, workItems);
if (!string.IsNullOrEmpty(workItem.Tags) && idsNotMatching.Count == 0)
continue;
}
results.Add($"## {workItem.AssignedTo} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
results.Add($"- [{workItem.Id}]({url}{workItem.Id})");
foreach (int id in idsNotMatching)
results.Add($"- [ ] {id} {nameof(workItem.Tags)} != {workItem.Tags}");
results.Add(string.Empty);
lines.AddRange(results);
}
}
private static ReadOnlyCollection<int> GetIdsNotMatching(int? priority, ReadOnlyCollection<WorkItem> workItems)
{
List<int> results = new();
foreach (WorkItem workItem in workItems)
{
if (workItem.Priority == priority)
continue;
results.Add(workItem.Id);
}
return new(results);
}
private static void FeatureCheckPriority(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> workItemAndChildren, string workItemType)
{
WorkItem workItem;
List<string> results = new();
ReadOnlyCollection<int> idsNotMatching;
ReadOnlyCollection<WorkItem> workItems;
foreach (KeyValuePair<int, Record> keyValuePair in workItemAndChildren)
{
workItem = keyValuePair.Value.WorkItem;
if (workItem.WorkItemType != workItemType)
continue;
results.Clear();
if (keyValuePair.Value.Children.Count == 0)
continue;
workItems = FilterChildren(keyValuePair.Value, workItemTypes);
idsNotMatching = GetIdsNotMatching(workItem.Priority, workItems);
if (idsNotMatching.Count == 0)
continue;
results.Add($"## {workItem.AssignedTo} - {workItem.Id} - {workItem.Title}");
results.Add(string.Empty);
results.Add($"- [{workItem.Id}]({url}{workItem.Id})");
foreach (int id in idsNotMatching)
results.Add($"- [ ] {id} {nameof(workItem.Priority)} != {workItem.Priority}");
results.Add(string.Empty);
lines.AddRange(results);
}
}
private static void WriteMarkdownFile(FileConnectorConfiguration fileConnectorConfiguration, string url, string[] alternateTargetFolders, ReadOnlyCollection<WorkItem> workItems, ReadOnlyCollection<string> workItemTypes)
{
string json;
string old;
string checkFile;
string? pathRoot;
List<char> spaces = new();
List<string> lines = new();
ReadOnlyDictionary<int, WorkItem> keyValuePairs = GetWorkItems(workItems);
ReadOnlyCollection<string> userStoryWorkItemTypes = new(new string[] { "User Story" });
ReadOnlyDictionary<int, Record> workItemAndChildren = GetWorkItemAndChildren(keyValuePairs);
ReadOnlyCollection<string> userStoryTaskWorkItemTypes = new(new string[] { "User Story", "Task" });
JsonSerializerOptions jsonSerializerOptions = new() { WriteIndented = true };
string json = JsonSerializer.Serialize(workItems, jsonSerializerOptions);
foreach (string alternateTargetFolder in alternateTargetFolders)
{
if (alternateTargetFolder == fileConnectorConfiguration.TargetFileLocation)
@ -525,47 +187,15 @@ public class FileRead : Shared.FileRead, IFileRead
{ continue; }
if (!Directory.Exists(alternateTargetFolder))
_ = Directory.CreateDirectory(alternateTargetFolder);
if (workItemAndChildren.Count == -1)
{
json = JsonSerializer.Serialize(workItemAndChildren, new JsonSerializerOptions() { WriteIndented = true });
File.WriteAllText(Path.Combine(alternateTargetFolder, ".json"), json);
}
foreach (string workItemType in workItemTypes)
{
lines.Clear();
lines.Add("# WorkItems");
lines.Add(string.Empty);
AppendLines(url, spaces, lines, workItemAndChildren, workItemType);
WriteFiles(alternateTargetFolder, workItemType, new(lines));
}
{
lines.Clear();
string workItemType = "Feature";
lines.Add($"# {nameof(FeatureCheckIterationPath)}");
lines.Add(string.Empty);
FeatureCheckIterationPath(url, lines, userStoryTaskWorkItemTypes, workItemAndChildren, workItemType);
WriteFiles(alternateTargetFolder, $"{nameof(FeatureCheckIterationPath)}", new(lines));
}
{
lines.Clear();
string workItemType = "Feature";
lines.Add($"# {nameof(FeatureCheckTag)}");
lines.Add(string.Empty);
FeatureCheckTag(url, lines, userStoryWorkItemTypes, workItemAndChildren, workItemType);
WriteFiles(alternateTargetFolder, $"{nameof(FeatureCheckTag)}", new(lines));
}
{
lines.Clear();
string workItemType = "Feature";
lines.Add($"# {nameof(FeatureCheckPriority)}");
lines.Add(string.Empty);
FeatureCheckPriority(url, lines, userStoryWorkItemTypes, workItemAndChildren, workItemType);
WriteFiles(alternateTargetFolder, $"{nameof(FeatureCheckPriority)}", new(lines));
}
checkFile = Path.Combine(alternateTargetFolder, fileConnectorConfiguration.TargetFileName);
old = !File.Exists(checkFile) ? string.Empty : File.ReadAllText(checkFile);
if (old == json)
continue;
File.WriteAllText(checkFile, json);
}
}
private static void ParseWorkItemsAsync(FileConnectorConfiguration fileConnectorConfiguration, string url, string[] alternateTargetFolders, ReadOnlyCollection<string> workItemTypes)
private static void ParseWorkItemsAsync(FileConnectorConfiguration fileConnectorConfiguration, string[] alternateTargetFolders)
{
if (!Directory.Exists(fileConnectorConfiguration.TargetFileLocation))
_ = Directory.CreateDirectory(fileConnectorConfiguration.TargetFileLocation);
@ -573,17 +203,14 @@ public class FileRead : Shared.FileRead, IFileRead
ReadOnlyCollection<Value> collection = GetWorkItems(files);
ReadOnlyCollection<WorkItem> workItems = GetWorkItems(collection);
if (workItems.Count > 0)
{
ParseWorkItemsAsync(fileConnectorConfiguration, alternateTargetFolders, workItems);
WriteMarkdownFile(fileConnectorConfiguration, url, alternateTargetFolders, workItems, workItemTypes);
}
WriteCollectionJson(fileConnectorConfiguration, alternateTargetFolders, workItems);
}
private static void ParseWorkItemsAsync(FileConnectorConfiguration fileConnectorConfiguration, string url, ReadOnlyCollection<string> workItemTypes)
private static void ParseWorkItemsAsync(FileConnectorConfiguration fileConnectorConfiguration)
{
string[] alternateTargetFolders = fileConnectorConfiguration.AlternateTargetFolder.Split('|');
if (alternateTargetFolders.Length > 0)
ParseWorkItemsAsync(fileConnectorConfiguration, url, alternateTargetFolders, workItemTypes);
ParseWorkItemsAsync(fileConnectorConfiguration, alternateTargetFolders);
}
private void Callback(object state)
@ -591,7 +218,7 @@ public class FileRead : Shared.FileRead, IFileRead
try
{
if (_IsEAFHosted)
ParseWorkItemsAsync(_FileConnectorConfiguration, _URL, _WorkItemTypes);
ParseWorkItemsAsync(_FileConnectorConfiguration);
}
catch (Exception exception)
{

View File

@ -5,40 +5,64 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>FI Backlog HiRel (Leominster)</title>
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-10-04-08-34" rel="stylesheet" />
<link href="/igniteui/css/structure/infragistics.css?v=2024-10-04-08-34" rel="stylesheet" />
<link href="/styles/bootstrap.min.css?no-cache=2024-10-04-08-34" rel="stylesheet" />
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-10-07-10-09" rel="stylesheet" />
<link href="/igniteui/css/structure/infragistics.css?v=2024-10-07-10-09" rel="stylesheet" />
<link href="/styles/leo.css?no-cache=2024-10-04-08-34" rel="stylesheet" />
<script src="/js/jquery-3.6.0.min.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/js/jquery-ui.min.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/js/leo.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.core.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.lob.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.dv.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/js/jquery-3.6.0.min.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/js/jquery-ui.min.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/js/leo.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.core.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.lob.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.dv.js?v=2024-10-07-10-09" type="text/javascript"></script>
</head>
<body>
<div style="float: right;">
<a target="_blank" href="/json/Feature.html">Feature(s)</a>
<div class="navbar navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-brand" style="min-width: 20px;">
FI Backlog HiRel (Leominster)
</div>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a target="_blank" href="/markdown/Feature.html">Feature(s)</a></li>
<li><a target="_blank" href="/markdown/FeatureCheckTag.html">Tag</a></li>
<li><a target="_blank" href="/markdown/FeatureCheckPriority.html">Priority</a></li>
<li><a target="_blank" href="/markdown/FeatureCheckIterationPath.html">Iteration Path</a></li>
</ul>
<p class="navbar-text navbar-right">
&nbsp;
</p>
</div>
</div>
</div>
<div class="container-fluid body-content" style="margin-top: 10px;">
<div style="height: 550px;" id="HeaderGridDiv">
<table id="HeaderGrid"></table>
</div>
<br />&nbsp;
<div id="AllGridDiv">
<table id="AllGrid"></table>
</div>
</div>
<h2>FI Backlog HiRel (Leominster)</h2>
<div style="height: 550px;" id="HeaderGridDiv">
<table id="HeaderGrid"></table>
</div>
<br />&nbsp;
<div id="AllGridDiv">
<table id="AllGrid"></table>
</div>
<script>
$(document).ready(function () {
initIndex("/json/work-items.json?v=2024-10-04-08-34");
$(document).ready(function () {
initIndex("/json/work-items.json?v=2024-10-07-10-09");
});
</script>
</body>
</html>
</html>

View File

@ -5,40 +5,64 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>FI Backlog Mesa</title>
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-10-04-08-34" rel="stylesheet" />
<link href="/igniteui/css/structure/infragistics.css?v=2024-10-04-08-34" rel="stylesheet" />
<link href="/styles/bootstrap.min.css?no-cache=2024-10-04-08-34" rel="stylesheet" />
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-10-07-10-09" rel="stylesheet" />
<link href="/igniteui/css/structure/infragistics.css?v=2024-10-07-10-09" rel="stylesheet" />
<link href="/styles/mes.css?no-cache=2024-10-04-08-34" rel="stylesheet" />
<script src="/js/jquery-3.6.0.min.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/js/jquery-ui.min.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/js/mes.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.core.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.lob.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.dv.js?v=2024-10-04-08-34" type="text/javascript"></script>
<script src="/js/jquery-3.6.0.min.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/js/jquery-ui.min.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/js/mes.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.core.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.lob.js?v=2024-10-07-10-09" type="text/javascript"></script>
<script src="/igniteui/js/infragistics.dv.js?v=2024-10-07-10-09" type="text/javascript"></script>
</head>
<body>
<div style="float: right;">
<a target="_blank" href="/json/Feature.html">Feature(s)</a>
<div class="navbar navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="navbar-brand" style="min-width: 20px;">
FI Backlog Mes
</div>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a target="_blank" href="/markdown/Feature.html">Feature(s)</a></li>
<li><a target="_blank" href="/markdown/FeatureCheckTag.html">Tag</a></li>
<li><a target="_blank" href="/markdown/FeatureCheckPriority.html">Priority</a></li>
<li><a target="_blank" href="/markdown/FeatureCheckIterationPath.html">Iteration Path</a></li>
</ul>
<p class="navbar-text navbar-right">
&nbsp;
</p>
</div>
</div>
</div>
<div class="container-fluid body-content" style="margin-top: 10px;">
<div style="height: 550px;" id="HeaderGridDiv">
<table id="HeaderGrid"></table>
</div>
<br />&nbsp;
<div id="AllGridDiv">
<table id="AllGrid"></table>
</div>
</div>
<h2>FI Backlog Mesa</h2>
<div style="height: 550px;" id="HeaderGridDiv">
<table id="HeaderGrid"></table>
</div>
<br />&nbsp;
<div id="AllGridDiv">
<table id="AllGrid"></table>
</div>
<script>
$(document).ready(function () {
initIndex("/json/work-items.json?v=2024-10-04-08-34");
$(document).ready(function () {
initIndex("/json/work-items.json?v=2024-10-07-10-09");
});
</script>
</body>
</html>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -503,7 +503,7 @@ public class FileRead : Properties.IFileRead
foreach (string match in matches)
{
fileName = Path.GetFileName(match);
File.Move(match, Path.Combine(fileConnectorConfiguration.SourceFileLocation, fileName));
File.Move(match, Path.Combine(nestedDirectory, fileName));
}
}
}

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_57_0;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0;
[TestClass]
public class ALIGNMENT_EQPT : EAFLoggingUnitTesting
@ -19,7 +19,7 @@ public class ALIGNMENT_EQPT : EAFLoggingUnitTesting
internal static string DummyRoot { get; private set; }
internal static ALIGNMENT_EQPT EAFLoggingUnitTesting { get; private set; }
static ALIGNMENT_EQPT() => DummyRoot = @"\\mestsa003.infineon.com\EC_Characterization_Si\Dummy";
static ALIGNMENT_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public ALIGNMENT_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
@ -52,7 +52,7 @@ public class ALIGNMENT_EQPT : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile()
public void Production__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile()
{
string check = ".xlsx";
MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_57_0;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0;
[TestClass]
public class ALIGNMENT : EAFLoggingUnitTesting
@ -19,7 +19,7 @@ public class ALIGNMENT : EAFLoggingUnitTesting
internal static string DummyRoot { get; private set; }
internal static ALIGNMENT EAFLoggingUnitTesting { get; private set; }
static ALIGNMENT() => DummyRoot = @"\\mestsa003.infineon.com\EC_Characterization_Si\Dummy";
static ALIGNMENT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public ALIGNMENT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
@ -52,7 +52,7 @@ public class ALIGNMENT : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__ALIGNMENT__ConvertExcelToJson()
public void Production__v2_57_0__ALIGNMENT__ConvertExcelToJson()
{
string check = "*.xlsx";
MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_57_0;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0;
[TestClass]
public class BACKLOG_EQPT : EAFLoggingUnitTesting
@ -19,7 +19,7 @@ public class BACKLOG_EQPT : EAFLoggingUnitTesting
internal static string DummyRoot { get; private set; }
internal static BACKLOG_EQPT EAFLoggingUnitTesting { get; private set; }
static BACKLOG_EQPT() => DummyRoot = @"\\mestsa003.infineon.com\EC_Characterization_Si\Dummy";
static BACKLOG_EQPT() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BACKLOG_EQPT() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
@ -52,7 +52,7 @@ public class BACKLOG_EQPT : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__BACKLOG_EQPT__DownloadWorkItems()
public void Production__v2_57_0__BACKLOG_EQPT__DownloadWorkItems()
{
string check = ".xlsx";
MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_57_0;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0;
[TestClass]
public class BACKLOG : EAFLoggingUnitTesting
@ -19,7 +19,7 @@ public class BACKLOG : EAFLoggingUnitTesting
internal static string DummyRoot { get; private set; }
internal static BACKLOG EAFLoggingUnitTesting { get; private set; }
static BACKLOG() => DummyRoot = @"\\mestsa003.infineon.com\EC_Characterization_Si\Dummy";
static BACKLOG() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public BACKLOG() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
@ -52,7 +52,7 @@ public class BACKLOG : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__BACKLOG__json()
public void Production__v2_57_0__BACKLOG__json()
{
string check = "*.json";
MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -7,7 +7,7 @@ using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Adaptation._Tests.CreateSelfDescription.Development.v2_57_0;
namespace Adaptation._Tests.CreateSelfDescription.Production.v2_57_0;
[TestClass]
public class MESAFIBACKLOG : EAFLoggingUnitTesting
@ -19,7 +19,7 @@ public class MESAFIBACKLOG : EAFLoggingUnitTesting
internal static string DummyRoot { get; private set; }
internal static MESAFIBACKLOG EAFLoggingUnitTesting { get; private set; }
static MESAFIBACKLOG() => DummyRoot = @"\\mestsa003.infineon.com\EC_Characterization_Si\Dummy";
static MESAFIBACKLOG() => DummyRoot = @"\\mesfs.infineon.com\EC_Characterization_Si\Dummy";
public MESAFIBACKLOG() : base(DummyRoot, testContext: null, declaringType: null, skipEquipmentDictionary: false)
{
@ -52,7 +52,20 @@ public class MESAFIBACKLOG : EAFLoggingUnitTesting
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__MESAFIBACKLOG__Kanban()
public void Production__v2_57_0__MESAFIBACKLOG__Kanban()
{
string check = "*.json";
MethodBase methodBase = new StackFrame().GetMethod();
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Getting configuration"));
_ = AdaptationTesting.GetWriteConfigurationGetFileRead(methodBase, check, EAFLoggingUnitTesting.AdaptationTesting);
EAFLoggingUnitTesting.Logger.LogInformation(string.Concat(methodBase.Name, " - Exit"));
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MESAFIBACKLOG__Markdown()
{
string check = "*.json";
MethodBase methodBase = new StackFrame().GetMethod();

View File

@ -1,64 +0,0 @@
#if true
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text.Json;
namespace Adaptation._Tests.Extract.Development.v2_57_0;
[TestClass]
public class MESAFIBACKLOG
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Development.v2_57_0.MESAFIBACKLOG _MESAFIBACKLOG;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Development.v2_57_0.MESAFIBACKLOG.ClassInitialize(testContext);
_MESAFIBACKLOG = CreateSelfDescription.Development.v2_57_0.MESAFIBACKLOG.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__MESAFIBACKLOG__Kanban() => _MESAFIBACKLOG.Development__v2_57_0__MESAFIBACKLOG__Kanban();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__MESAFIBACKLOG__Kanban638323658386612552__Normal()
{
string check = "*.json";
bool validatePDSF = false;
_MESAFIBACKLOG.Development__v2_57_0__MESAFIBACKLOG__Kanban();
MethodBase methodBase = new StackFrame().GetMethod();
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
NonThrowTryCatch();
}
}
#endif

View File

@ -5,7 +5,7 @@ using System.Diagnostics;
using System.Reflection;
using System.Threading;
namespace Adaptation._Tests.Extract.Development.v2_57_0;
namespace Adaptation._Tests.Extract.Production.v2_57_0;
[TestClass]
public class ALIGNMENT_EQPT
@ -14,13 +14,13 @@ public class ALIGNMENT_EQPT
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Development.v2_57_0.ALIGNMENT_EQPT _ALIGNMENT_EQPT;
private static CreateSelfDescription.Production.v2_57_0.ALIGNMENT_EQPT _ALIGNMENT_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Development.v2_57_0.ALIGNMENT_EQPT.ClassInitialize(testContext);
_ALIGNMENT_EQPT = CreateSelfDescription.Development.v2_57_0.ALIGNMENT_EQPT.EAFLoggingUnitTesting;
CreateSelfDescription.Production.v2_57_0.ALIGNMENT_EQPT.ClassInitialize(testContext);
_ALIGNMENT_EQPT = CreateSelfDescription.Production.v2_57_0.ALIGNMENT_EQPT.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
@ -32,16 +32,16 @@ public class ALIGNMENT_EQPT
[Ignore]
[TestMethod]
public void Development__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile() => _ALIGNMENT_EQPT.Development__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile();
public void Production__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile() => _ALIGNMENT_EQPT.Production__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile();
[Ignore]
[TestMethod]
public void Development__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile637961178824025822__Normal()
public void Production__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile637961178824025822__Normal()
{
string check = ".xlsx";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_ALIGNMENT_EQPT.Development__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile();
_ALIGNMENT_EQPT.Production__v2_57_0__ALIGNMENT_EQPT__DownloadExcelFile();
_ = _ALIGNMENT_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
for (int i = 0; i < int.MinValue; i++)
Thread.Sleep(500);

View File

@ -9,7 +9,7 @@ using System.IO;
using System.Reflection;
using System.Text.Json;
namespace Adaptation._Tests.Extract.Development.v2_57_0;
namespace Adaptation._Tests.Extract.Production.v2_57_0;
[TestClass]
public class ALIGNMENT
@ -18,13 +18,13 @@ public class ALIGNMENT
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Development.v2_57_0.ALIGNMENT _ALIGNMENT;
private static CreateSelfDescription.Production.v2_57_0.ALIGNMENT _ALIGNMENT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Development.v2_57_0.ALIGNMENT.ClassInitialize(testContext);
_ALIGNMENT = CreateSelfDescription.Development.v2_57_0.ALIGNMENT.EAFLoggingUnitTesting;
CreateSelfDescription.Production.v2_57_0.ALIGNMENT.ClassInitialize(testContext);
_ALIGNMENT = CreateSelfDescription.Production.v2_57_0.ALIGNMENT.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
@ -38,18 +38,18 @@ public class ALIGNMENT
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__ALIGNMENT__ConvertExcelToJson() => _ALIGNMENT.Development__v2_57_0__ALIGNMENT__ConvertExcelToJson();
public void Production__v2_57_0__ALIGNMENT__ConvertExcelToJson() => _ALIGNMENT.Production__v2_57_0__ALIGNMENT__ConvertExcelToJson();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__ALIGNMENT__ConvertExcelToJson638353030755467303__Normal()
public void Production__v2_57_0__ALIGNMENT__ConvertExcelToJson638353030755467303__Normal()
{
string check = "*.xlsx";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_ALIGNMENT.Development__v2_57_0__ALIGNMENT__ConvertExcelToJson();
_ALIGNMENT.Production__v2_57_0__ALIGNMENT__ConvertExcelToJson();
Assert.IsFalse(string.IsNullOrEmpty(_ALIGNMENT.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _ALIGNMENT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _ALIGNMENT.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);

View File

@ -5,7 +5,7 @@ using System.Diagnostics;
using System.Reflection;
using System.Threading;
namespace Adaptation._Tests.Extract.Development.v2_57_0;
namespace Adaptation._Tests.Extract.Production.v2_57_0;
[TestClass]
public class BACKLOG_EQPT
@ -14,13 +14,13 @@ public class BACKLOG_EQPT
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Development.v2_57_0.BACKLOG_EQPT _BACKLOG_EQPT;
private static CreateSelfDescription.Production.v2_57_0.BACKLOG_EQPT _BACKLOG_EQPT;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Development.v2_57_0.BACKLOG_EQPT.ClassInitialize(testContext);
_BACKLOG_EQPT = CreateSelfDescription.Development.v2_57_0.BACKLOG_EQPT.EAFLoggingUnitTesting;
CreateSelfDescription.Production.v2_57_0.BACKLOG_EQPT.ClassInitialize(testContext);
_BACKLOG_EQPT = CreateSelfDescription.Production.v2_57_0.BACKLOG_EQPT.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
@ -32,16 +32,16 @@ public class BACKLOG_EQPT
[Ignore]
[TestMethod]
public void Development__v2_57_0__BACKLOG_EQPT__DownloadWorkItems() => _BACKLOG_EQPT.Development__v2_57_0__BACKLOG_EQPT__DownloadWorkItems();
public void Production__v2_57_0__BACKLOG_EQPT__DownloadWorkItems() => _BACKLOG_EQPT.Production__v2_57_0__BACKLOG_EQPT__DownloadWorkItems();
[Ignore]
[TestMethod]
public void Development__v2_57_0__BACKLOG_EQPT__DownloadWorkItems638612245609095845__Normal()
public void Production__v2_57_0__BACKLOG_EQPT__DownloadWorkItems638612245609095845__Normal()
{
string check = ".json";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_BACKLOG_EQPT.Development__v2_57_0__BACKLOG_EQPT__DownloadWorkItems();
_BACKLOG_EQPT.Production__v2_57_0__BACKLOG_EQPT__DownloadWorkItems();
_ = _BACKLOG_EQPT.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
for (int i = 0; i < int.MinValue; i++)
Thread.Sleep(500);

View File

@ -9,7 +9,7 @@ using System.IO;
using System.Reflection;
using System.Text.Json;
namespace Adaptation._Tests.Extract.Development.v2_57_0;
namespace Adaptation._Tests.Extract.Production.v2_57_0;
[TestClass]
public class BACKLOG
@ -18,13 +18,13 @@ public class BACKLOG
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Development.v2_57_0.BACKLOG _BACKLOG;
private static CreateSelfDescription.Production.v2_57_0.BACKLOG _BACKLOG;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Development.v2_57_0.BACKLOG.ClassInitialize(testContext);
_BACKLOG = CreateSelfDescription.Development.v2_57_0.BACKLOG.EAFLoggingUnitTesting;
CreateSelfDescription.Production.v2_57_0.BACKLOG.ClassInitialize(testContext);
_BACKLOG = CreateSelfDescription.Production.v2_57_0.BACKLOG.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
@ -38,18 +38,18 @@ public class BACKLOG
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__BACKLOG__json() => _BACKLOG.Development__v2_57_0__BACKLOG__json();
public void Production__v2_57_0__BACKLOG__json() => _BACKLOG.Production__v2_57_0__BACKLOG__json();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Development__v2_57_0__BACKLOG__json638612245609095846__Normal()
public void Production__v2_57_0__BACKLOG__json638612245609095846__Normal()
{
string check = "*.json";
bool validatePDSF = false;
MethodBase methodBase = new StackFrame().GetMethod();
_BACKLOG.Development__v2_57_0__BACKLOG__json();
_BACKLOG.Production__v2_57_0__BACKLOG__json();
Assert.IsFalse(string.IsNullOrEmpty(_BACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _BACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _BACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);

View File

@ -0,0 +1,90 @@
#if true
using Adaptation.Shared;
using Adaptation.Shared.Methods;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text.Json;
namespace Adaptation._Tests.Extract.Production.v2_57_0;
[TestClass]
public class MESAFIBACKLOG
{
#pragma warning disable CA2254
#pragma warning disable IDE0060
private static CreateSelfDescription.Production.v2_57_0.MESAFIBACKLOG _MESAFIBACKLOG;
[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
CreateSelfDescription.Production.v2_57_0.MESAFIBACKLOG.ClassInitialize(testContext);
_MESAFIBACKLOG = CreateSelfDescription.Production.v2_57_0.MESAFIBACKLOG.EAFLoggingUnitTesting;
}
private static void NonThrowTryCatch()
{
try
{ throw new Exception(); }
catch (Exception) { }
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MESAFIBACKLOG__Kanban() => _MESAFIBACKLOG.Production__v2_57_0__MESAFIBACKLOG__Kanban();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MESAFIBACKLOG__Kanban638323658386612552__Normal()
{
string check = "*.json";
bool validatePDSF = false;
_MESAFIBACKLOG.Production__v2_57_0__MESAFIBACKLOG__Kanban();
MethodBase methodBase = new StackFrame().GetMethod();
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
NonThrowTryCatch();
}
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MESAFIBACKLOG__Markdown() => _MESAFIBACKLOG.Production__v2_57_0__MESAFIBACKLOG__Markdown();
#if DEBUG
[Ignore]
#endif
[TestMethod]
public void Production__v2_57_0__MESAFIBACKLOG__Markdown638323658386612552__Normal()
{
string check = "*.json";
bool validatePDSF = false;
_MESAFIBACKLOG.Production__v2_57_0__MESAFIBACKLOG__Markdown();
MethodBase methodBase = new StackFrame().GetMethod();
Assert.IsFalse(string.IsNullOrEmpty(_MESAFIBACKLOG.AdaptationTesting.TestContext.FullyQualifiedTestClassName));
string[] variables = _MESAFIBACKLOG.AdaptationTesting.GetVariables(methodBase, check, validatePDSF);
IFileRead fileRead = _MESAFIBACKLOG.AdaptationTesting.Get(methodBase, sourceFileLocation: variables[2], sourceFileFilter: variables[3], useCyclicalForDescription: false);
Tuple<string, Test[], JsonElement[], List<FileInfo>> extractResult = fileRead.ReExtract();
Assert.IsFalse(string.IsNullOrEmpty(extractResult?.Item1));
Assert.IsNotNull(extractResult.Item3);
Assert.IsNotNull(extractResult.Item4);
NonThrowTryCatch();
}
}
#endif

View File

@ -974,8 +974,8 @@ public class AdaptationTesting : ISMTP
}
if (!string.IsNullOrEmpty(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
{
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder);
if (!Directory.Exists(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder.Split('|')[0]))
_ = Directory.CreateDirectory(fileConnectorConfigurationTuple.Item2.AlternateTargetFolder.Split('|')[0]);
}
}
catch (IOException ex)

View File

@ -137,6 +137,7 @@
<Compile Include="Adaptation\FileHandlers\json\WorkItems\Value.cs" />
<Compile Include="Adaptation\FileHandlers\json\WorkItems\WorkItem.cs" />
<Compile Include="Adaptation\FileHandlers\Kanban\FileRead.cs" />
<Compile Include="Adaptation\FileHandlers\Markdown\FileRead.cs" />
<Compile Include="Adaptation\FileHandlers\MoveMatchingFiles\FileRead.cs" />
<Compile Include="Adaptation\FileHandlers\OpenInsight\FileRead.cs" />
<Compile Include="Adaptation\FileHandlers\OpenInsightMetrologyViewer\FileRead.cs" />