CoD
With Parents on pages WSJF Columns
This commit is contained in:
1
Adaptation/.vscode/mklink.md
vendored
1
Adaptation/.vscode/mklink.md
vendored
@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
mklink /J "T:\MESAFIBACKLOG\06_SourceCode\MESAFIBACKLOG\Adaptation\.kanbn" "D:\5-Other-Small\Kanban\MESAFIBACKLOG"
|
mklink /J "T:\MESAFIBACKLOG\06_SourceCode\MESAFIBACKLOG\Adaptation\.kanbn" "D:\5-Other-Small\Kanban\MESAFIBACKLOG"
|
||||||
|
mklink /J "T:\MESAFIBACKLOG\06_SourceCode\MESAFIBACKLOG\Adaptation\.vscode\helper" "D:\web-sites\OI-Metrology\_markdown"
|
||||||
```
|
```
|
||||||
|
@ -208,11 +208,11 @@ public class ProcessData : IProcessData
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
records = GetKeyValuePairs(keyValuePairs, keyValuePair.Value, nests);
|
records = GetKeyValuePairs(keyValuePairs, keyValuePair.Value, nests);
|
||||||
record = new(keyValuePair.Value, parentWorkItem, records);
|
record = Record.Get(keyValuePair.Value, parentWorkItem, records);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
record = new(keyValuePair.Value, parentWorkItem, new(Array.Empty<Record>()));
|
record = new(keyValuePair.Value, parentWorkItem, Array.Empty<Record>());
|
||||||
}
|
}
|
||||||
results.Add(keyValuePair.Key, record);
|
results.Add(keyValuePair.Key, record);
|
||||||
}
|
}
|
||||||
@ -321,7 +321,7 @@ public class ProcessData : IProcessData
|
|||||||
else
|
else
|
||||||
_ = keyValuePairs.TryGetValue(w.Parent.Value, out parentWorkItem);
|
_ = keyValuePairs.TryGetValue(w.Parent.Value, out parentWorkItem);
|
||||||
records = GetKeyValuePairs(keyValuePairs, w, nests);
|
records = GetKeyValuePairs(keyValuePairs, w, nests);
|
||||||
record = new(w, parentWorkItem, records);
|
record = Record.Get(w, parentWorkItem, records);
|
||||||
results.Add(record);
|
results.Add(record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,19 +80,21 @@ public class ProcessData : IProcessData
|
|||||||
}
|
}
|
||||||
List<char> spaces = new();
|
List<char> spaces = new();
|
||||||
List<string> lines = new();
|
List<string> lines = new();
|
||||||
ReadOnlyCollection<WorkItem> results;
|
ReadOnlyCollection<Record> results;
|
||||||
ReadOnlyDictionary<int, Record> keyValuePairs = GetWorkItems(workItems);
|
ReadOnlyDictionary<int, Record> keyValuePairs = GetWorkItems(workItems);
|
||||||
ReadOnlyCollection<Record> records = new(keyValuePairs.Values.ToArray());
|
ReadOnlyCollection<Record> records = new(keyValuePairs.Values.ToArray());
|
||||||
|
ReadOnlyCollection<string> bugFeatureWorkItemTypes = new(new string[] { "Bug", "Feature" });
|
||||||
ReadOnlyCollection<string> bugUserStoryWorkItemTypes = new(new string[] { "Bug", "User Story" });
|
ReadOnlyCollection<string> bugUserStoryWorkItemTypes = new(new string[] { "Bug", "User Story" });
|
||||||
ReadOnlyCollection<string> bugUserStoryTaskWorkItemTypes = new(new string[] { "Bug", "User Story", "Task" });
|
ReadOnlyCollection<string> bugUserStoryTaskWorkItemTypes = new(new string[] { "Bug", "User Story", "Task" });
|
||||||
WriteWithPartentsFile(fileRead, destinationDirectory, fileInfoCollection, records, "with-parents");
|
WriteWithPartentsFile(fileRead, destinationDirectory, fileInfoCollection, records, bugFeatureWorkItemTypes, "bugs-features-with-parents");
|
||||||
|
WriteWithPartentsFile(fileRead, destinationDirectory, fileInfoCollection, records, bugUserStoryWorkItemTypes, "bugs-user-stories-with-parents");
|
||||||
foreach (string workItemType in workItemTypes)
|
foreach (string workItemType in workItemTypes)
|
||||||
{
|
{
|
||||||
lines.Clear();
|
lines.Clear();
|
||||||
lines.Add($"# {workItemType}");
|
lines.Add($"# {workItemType}");
|
||||||
lines.Add(string.Empty);
|
lines.Add(string.Empty);
|
||||||
AppendLines(url, spaces, lines, records, workItemType);
|
AppendLines(url, spaces, lines, records, workItemType);
|
||||||
results = new(Array.Empty<WorkItem>());
|
results = new(Array.Empty<Record>());
|
||||||
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, workItemType);
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, workItemType);
|
||||||
_Details.Add(results);
|
_Details.Add(results);
|
||||||
}
|
}
|
||||||
@ -101,7 +103,7 @@ public class ProcessData : IProcessData
|
|||||||
string workItemType = "Feature";
|
string workItemType = "Feature";
|
||||||
lines.Add($"# {nameof(FeatureCheckIterationPath122508)}");
|
lines.Add($"# {nameof(FeatureCheckIterationPath122508)}");
|
||||||
lines.Add(string.Empty);
|
lines.Add(string.Empty);
|
||||||
results = FeatureCheckIterationPath122508(url, lines, bugUserStoryTaskWorkItemTypes, records, workItemType);
|
results = FeatureCheckIterationPath122508(url, lines, bugUserStoryTaskWorkItemTypes, keyValuePairs, workItemType);
|
||||||
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-122508");
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-122508");
|
||||||
_Details.Add(results);
|
_Details.Add(results);
|
||||||
}
|
}
|
||||||
@ -110,7 +112,7 @@ public class ProcessData : IProcessData
|
|||||||
string workItemType = "Feature";
|
string workItemType = "Feature";
|
||||||
lines.Add($"# {nameof(FeatureCheckTag122514)}");
|
lines.Add($"# {nameof(FeatureCheckTag122514)}");
|
||||||
lines.Add(string.Empty);
|
lines.Add(string.Empty);
|
||||||
results = FeatureCheckTag122514(url, lines, bugUserStoryWorkItemTypes, records, workItemType);
|
results = FeatureCheckTag122514(url, lines, bugUserStoryWorkItemTypes, keyValuePairs, workItemType);
|
||||||
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-122514");
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-122514");
|
||||||
_Details.Add(results);
|
_Details.Add(results);
|
||||||
}
|
}
|
||||||
@ -119,7 +121,7 @@ public class ProcessData : IProcessData
|
|||||||
string workItemType = "Feature";
|
string workItemType = "Feature";
|
||||||
lines.Add($"# {nameof(FeatureCheckPriority126169)}");
|
lines.Add($"# {nameof(FeatureCheckPriority126169)}");
|
||||||
lines.Add(string.Empty);
|
lines.Add(string.Empty);
|
||||||
results = FeatureCheckPriority126169(url, lines, bugUserStoryWorkItemTypes, records, workItemType);
|
results = FeatureCheckPriority126169(url, lines, bugUserStoryWorkItemTypes, keyValuePairs, workItemType);
|
||||||
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-126169");
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-126169");
|
||||||
_Details.Add(results);
|
_Details.Add(results);
|
||||||
}
|
}
|
||||||
@ -128,7 +130,7 @@ public class ProcessData : IProcessData
|
|||||||
string workItemType = "Feature";
|
string workItemType = "Feature";
|
||||||
lines.Add($"# {nameof(FeatureCheckState123066)}");
|
lines.Add($"# {nameof(FeatureCheckState123066)}");
|
||||||
lines.Add(string.Empty);
|
lines.Add(string.Empty);
|
||||||
results = FeatureCheckState123066(url, lines, bugUserStoryTaskWorkItemTypes, records, workItemType);
|
results = FeatureCheckState123066(url, lines, bugUserStoryTaskWorkItemTypes, keyValuePairs, workItemType);
|
||||||
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-123066");
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-123066");
|
||||||
_Details.Add(results);
|
_Details.Add(results);
|
||||||
}
|
}
|
||||||
@ -137,7 +139,7 @@ public class ProcessData : IProcessData
|
|||||||
string workItemType = "Feature";
|
string workItemType = "Feature";
|
||||||
lines.Add($"# {nameof(FeatureCheckState123067)}");
|
lines.Add($"# {nameof(FeatureCheckState123067)}");
|
||||||
lines.Add(string.Empty);
|
lines.Add(string.Empty);
|
||||||
results = FeatureCheckState123067(url, lines, bugUserStoryTaskWorkItemTypes, records, workItemType);
|
results = FeatureCheckState123067(url, lines, bugUserStoryTaskWorkItemTypes, keyValuePairs, workItemType);
|
||||||
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-123067");
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-123067");
|
||||||
_Details.Add(results);
|
_Details.Add(results);
|
||||||
}
|
}
|
||||||
@ -146,13 +148,13 @@ public class ProcessData : IProcessData
|
|||||||
string workItemType = "Feature";
|
string workItemType = "Feature";
|
||||||
lines.Add($"# {nameof(FeatureCheckStart122517)}");
|
lines.Add($"# {nameof(FeatureCheckStart122517)}");
|
||||||
lines.Add(string.Empty);
|
lines.Add(string.Empty);
|
||||||
results = FeatureCheckStart122517(url, lines, bugUserStoryTaskWorkItemTypes, records, workItemType);
|
results = FeatureCheckStart122517(url, lines, bugUserStoryTaskWorkItemTypes, keyValuePairs, workItemType);
|
||||||
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-122517");
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-122517");
|
||||||
_Details.Add(results);
|
_Details.Add(results);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void WriteFiles(IFileRead fileRead, string destinationDirectory, List<FileInfo> fileInfoCollection, ReadOnlyCollection<string> lines, ReadOnlyCollection<WorkItem> workItems, string fileName)
|
private static void WriteFiles(IFileRead fileRead, string destinationDirectory, List<FileInfo> fileInfoCollection, ReadOnlyCollection<string> lines, ReadOnlyCollection<Record> records, string fileName)
|
||||||
{
|
{
|
||||||
string markdown = string.Join(Environment.NewLine, lines);
|
string markdown = string.Join(Environment.NewLine, lines);
|
||||||
string markdownFile = Path.Combine(destinationDirectory, $"{fileName}.md");
|
string markdownFile = Path.Combine(destinationDirectory, $"{fileName}.md");
|
||||||
@ -168,7 +170,7 @@ public class ProcessData : IProcessData
|
|||||||
File.WriteAllText(htmlFile, html);
|
File.WriteAllText(htmlFile, html);
|
||||||
if (!fileRead.IsEAFHosted)
|
if (!fileRead.IsEAFHosted)
|
||||||
fileInfoCollection.Add(new(htmlFile));
|
fileInfoCollection.Add(new(htmlFile));
|
||||||
string json = JsonSerializer.Serialize(workItems, new JsonSerializerOptions() { WriteIndented = true });
|
string json = JsonSerializer.Serialize(records, new JsonSerializerOptions() { WriteIndented = true });
|
||||||
string jsonFile = Path.Combine(destinationDirectory, $"{fileName}.json");
|
string jsonFile = Path.Combine(destinationDirectory, $"{fileName}.json");
|
||||||
string jsonOld = !File.Exists(jsonFile) ? string.Empty : File.ReadAllText(jsonFile);
|
string jsonOld = !File.Exists(jsonFile) ? string.Empty : File.ReadAllText(jsonFile);
|
||||||
if (json != jsonOld)
|
if (json != jsonOld)
|
||||||
@ -187,10 +189,18 @@ public class ProcessData : IProcessData
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void WriteWithPartentsFile(IFileRead fileRead, string destinationDirectory, List<FileInfo> fileInfoCollection, ReadOnlyCollection<Record> records, string fileName)
|
private static void WriteWithPartentsFile(IFileRead fileRead, string destinationDirectory, List<FileInfo> fileInfoCollection, ReadOnlyCollection<Record> records, ReadOnlyCollection<string> workItemTypes, string fileName)
|
||||||
{
|
{
|
||||||
Record[] features = (from l in records where l.WorkItem.WorkItemType == "Feature" select l).ToArray();
|
List<Record> filtered = new();
|
||||||
string json = JsonSerializer.Serialize(features, new JsonSerializerOptions() { WriteIndented = true });
|
Record record;
|
||||||
|
foreach (Record r in records)
|
||||||
|
{
|
||||||
|
if (r.WorkItem.State == "Removed" || !workItemTypes.Contains(r.WorkItem.WorkItemType))
|
||||||
|
continue;
|
||||||
|
record = new(r.WorkItem, r.Parent, Array.Empty<Record>());
|
||||||
|
filtered.Add(record);
|
||||||
|
}
|
||||||
|
string json = JsonSerializer.Serialize(filtered, new JsonSerializerOptions() { WriteIndented = true });
|
||||||
string jsonFile = Path.Combine(destinationDirectory, $"{fileName}.json");
|
string jsonFile = Path.Combine(destinationDirectory, $"{fileName}.json");
|
||||||
string jsonOld = !File.Exists(jsonFile) ? string.Empty : File.ReadAllText(jsonFile);
|
string jsonOld = !File.Exists(jsonFile) ? string.Empty : File.ReadAllText(jsonFile);
|
||||||
if (json != jsonOld)
|
if (json != jsonOld)
|
||||||
@ -213,7 +223,7 @@ public class ProcessData : IProcessData
|
|||||||
results.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
results.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
||||||
results.Add(string.Empty);
|
results.Add(string.Empty);
|
||||||
results.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
results.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
||||||
if (record.Children.Count == 0)
|
if (record.Children.Length == 0)
|
||||||
results.Add(string.Empty);
|
results.Add(string.Empty);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -279,11 +289,11 @@ public class ProcessData : IProcessData
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
records = GetKeyValuePairs(keyValuePairs, keyValuePair.Value, nests);
|
records = GetKeyValuePairs(keyValuePairs, keyValuePair.Value, nests);
|
||||||
record = new(keyValuePair.Value, parentWorkItem, records);
|
record = Record.Get(keyValuePair.Value, parentWorkItem, records);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
record = new(keyValuePair.Value, parentWorkItem, new(Array.Empty<Record>()));
|
record = new(keyValuePair.Value, parentWorkItem, Array.Empty<Record>());
|
||||||
}
|
}
|
||||||
results.Add(keyValuePair.Key, record);
|
results.Add(keyValuePair.Key, record);
|
||||||
}
|
}
|
||||||
@ -332,7 +342,7 @@ public class ProcessData : IProcessData
|
|||||||
else
|
else
|
||||||
_ = keyValuePairs.TryGetValue(w.Parent.Value, out parentWorkItem);
|
_ = keyValuePairs.TryGetValue(w.Parent.Value, out parentWorkItem);
|
||||||
records = GetKeyValuePairs(keyValuePairs, w, nests);
|
records = GetKeyValuePairs(keyValuePairs, w, nests);
|
||||||
record = new(w, parentWorkItem, records);
|
record = Record.Get(w, parentWorkItem, records);
|
||||||
results.Add(record);
|
results.Add(record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -383,20 +393,20 @@ public class ProcessData : IProcessData
|
|||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void FilterChildren(ReadOnlyCollection<string> workItemTypes, Record record, List<WorkItem> results)
|
private static void FilterChildren(ReadOnlyCollection<string> workItemTypes, Record record, List<Record> results)
|
||||||
{
|
{
|
||||||
foreach (Record r in record.Children)
|
foreach (Record r in record.Children)
|
||||||
{
|
{
|
||||||
if (!workItemTypes.Contains(r.WorkItem.WorkItemType))
|
if (!workItemTypes.Contains(r.WorkItem.WorkItemType))
|
||||||
continue;
|
continue;
|
||||||
results.Add(r.WorkItem);
|
results.Add(r);
|
||||||
FilterChildren(workItemTypes, r, results);
|
FilterChildren(workItemTypes, r, results);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> FilterChildren(ReadOnlyCollection<string> workItemTypes, Record record)
|
private static ReadOnlyCollection<Record> FilterChildren(ReadOnlyCollection<string> workItemTypes, Record record)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
FilterChildren(workItemTypes, record, results);
|
FilterChildren(workItemTypes, record, results);
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
@ -412,37 +422,39 @@ public class ProcessData : IProcessData
|
|||||||
_ => 8
|
_ => 8
|
||||||
};
|
};
|
||||||
|
|
||||||
private static string? GetMaxIterationPath122508(ReadOnlyCollection<WorkItem> workItems)
|
private static string? GetMaxIterationPath122508(ReadOnlyCollection<Record> records)
|
||||||
{
|
{
|
||||||
string? result;
|
string? result;
|
||||||
List<string> results = new();
|
List<string> results = new();
|
||||||
foreach (WorkItem workItem in workItems)
|
foreach (Record record in records)
|
||||||
{
|
{
|
||||||
if (results.Contains(workItem.IterationPath))
|
if (results.Contains(record.WorkItem.IterationPath))
|
||||||
continue;
|
continue;
|
||||||
results.Add(workItem.IterationPath);
|
results.Add(record.WorkItem.IterationPath);
|
||||||
}
|
}
|
||||||
result = results.Count == 0 ? null : results.Max();
|
result = results.Count == 0 ? null : results.Max();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> FeatureCheckIterationPath122508(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyCollection<Record> records, string workItemType)
|
private static ReadOnlyCollection<Record> FeatureCheckIterationPath122508(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
|
Record record;
|
||||||
string? maxIterationPath;
|
string? maxIterationPath;
|
||||||
List<string> collection = new();
|
List<string> collection = new();
|
||||||
ReadOnlyCollection<WorkItem> childrenWorkItems;
|
ReadOnlyCollection<Record> records;
|
||||||
foreach (Record record in records)
|
foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs)
|
||||||
{
|
{
|
||||||
|
record = keyValuePair.Value;
|
||||||
if (record.WorkItem.State is "Removed")
|
if (record.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
if (record.WorkItem.WorkItemType != workItemType)
|
if (record.WorkItem.WorkItemType != workItemType)
|
||||||
continue;
|
continue;
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
if (record.Children.Count == 0)
|
if (record.Children.Length == 0)
|
||||||
continue;
|
continue;
|
||||||
childrenWorkItems = FilterChildren(workItemTypes, record);
|
records = FilterChildren(workItemTypes, record);
|
||||||
maxIterationPath = GetMaxIterationPath122508(childrenWorkItems);
|
maxIterationPath = GetMaxIterationPath122508(records);
|
||||||
if (string.IsNullOrEmpty(maxIterationPath) || record.WorkItem.IterationPath == maxIterationPath)
|
if (string.IsNullOrEmpty(maxIterationPath) || record.WorkItem.IterationPath == maxIterationPath)
|
||||||
continue;
|
continue;
|
||||||
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
||||||
@ -450,137 +462,141 @@ public class ProcessData : IProcessData
|
|||||||
collection.Add($"- [ ] [{record.WorkItem.Id}]({url}{record.WorkItem.Id}) => {record.WorkItem.IterationPath} != {maxIterationPath}");
|
collection.Add($"- [ ] [{record.WorkItem.Id}]({url}{record.WorkItem.Id}) => {record.WorkItem.IterationPath} != {maxIterationPath}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
lines.AddRange(collection);
|
lines.AddRange(collection);
|
||||||
results.Add(WorkItem.Get(record.WorkItem, $"IterationPath:<a target='_blank' href='{url}{record.WorkItem.Id}'>{record.WorkItem.Id}</a>;{record.WorkItem.IterationPath} != {maxIterationPath}"));
|
results.Add(WorkItem.Get(record, $"IterationPath:<a target='_blank' href='{url}{record.WorkItem.Id}'>{record.WorkItem.Id}</a>;{record.WorkItem.IterationPath} != {maxIterationPath}"));
|
||||||
}
|
}
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> GetWorkItemsNotMatching122514(Record record, ReadOnlyCollection<WorkItem> workItems)
|
private static ReadOnlyCollection<Record> GetWorkItemsNotMatching122514(Record record, ReadOnlyCollection<Record> records)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
string[] segments;
|
string[] segments;
|
||||||
string[] parentTags = record.WorkItem.Tags.Split(';').Select(l => l.Trim()).ToArray();
|
string[] parentTags = record.WorkItem.Tags.Split(';').Select(l => l.Trim()).ToArray();
|
||||||
foreach (WorkItem workItem in workItems)
|
foreach (Record r in records)
|
||||||
{
|
{
|
||||||
segments = string.IsNullOrEmpty(workItem.Tags) ? Array.Empty<string>() : workItem.Tags.Split(';').Select(l => l.Trim()).ToArray();
|
segments = string.IsNullOrEmpty(r.WorkItem.Tags) ? Array.Empty<string>() : r.WorkItem.Tags.Split(';').Select(l => l.Trim()).ToArray();
|
||||||
if (segments.Length > 0 && parentTags.Any(l => segments.Contains(l)))
|
if (segments.Length > 0 && parentTags.Any(l => segments.Contains(l)))
|
||||||
continue;
|
continue;
|
||||||
results.Add(workItem);
|
results.Add(r);
|
||||||
}
|
}
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> FeatureCheckTag122514(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyCollection<Record> records, string workItemType)
|
private static ReadOnlyCollection<Record> FeatureCheckTag122514(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
|
Record record;
|
||||||
List<string> collection = new();
|
List<string> collection = new();
|
||||||
List<string> violations = new();
|
List<string> violations = new();
|
||||||
ReadOnlyCollection<WorkItem> childrenWorkItems;
|
ReadOnlyCollection<Record> records;
|
||||||
ReadOnlyCollection<WorkItem> workItemsNotMatching;
|
ReadOnlyCollection<Record> recordsNotMatching;
|
||||||
foreach (Record record in records)
|
foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs)
|
||||||
{
|
{
|
||||||
|
record = keyValuePair.Value;
|
||||||
if (record.WorkItem.State is "Removed")
|
if (record.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
if (record.WorkItem.WorkItemType != workItemType)
|
if (record.WorkItem.WorkItemType != workItemType)
|
||||||
continue;
|
continue;
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
violations.Clear();
|
violations.Clear();
|
||||||
if (record.Children.Count == 0)
|
if (record.Children.Length == 0)
|
||||||
continue;
|
continue;
|
||||||
if (string.IsNullOrEmpty(record.WorkItem.Tags))
|
if (string.IsNullOrEmpty(record.WorkItem.Tags))
|
||||||
workItemsNotMatching = new(new WorkItem[] { record.WorkItem });
|
recordsNotMatching = new(new Record[] { record });
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
childrenWorkItems = FilterChildren(workItemTypes, record);
|
records = FilterChildren(workItemTypes, record);
|
||||||
workItemsNotMatching = GetWorkItemsNotMatching122514(record, childrenWorkItems);
|
recordsNotMatching = GetWorkItemsNotMatching122514(record, records);
|
||||||
if (!string.IsNullOrEmpty(record.WorkItem.Tags) && workItemsNotMatching.Count == 0)
|
if (!string.IsNullOrEmpty(record.WorkItem.Tags) && recordsNotMatching.Count == 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
collection.Add($"- [ ] [{workItem}]({url}{workItem}) {nameof(record.WorkItem.Tags)} != {record.WorkItem.Tags}");
|
collection.Add($"- [ ] [{r.WorkItem}]({url}{r.WorkItem}) {nameof(record.WorkItem.Tags)} != {record.WorkItem.Tags}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
lines.AddRange(collection);
|
lines.AddRange(collection);
|
||||||
violations.Add($"Tag:{record.WorkItem.Tags};");
|
violations.Add($"Tag:{record.WorkItem.Tags};");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
violations.Add($"<a target='_blank' href='{url}{workItem.Id}'>{workItem.Id}</a>:{workItem.Tags};");
|
violations.Add($"<a target='_blank' href='{url}{r.WorkItem.Id}'>{r.WorkItem.Id}</a>:{r.WorkItem.Tags};");
|
||||||
results.Add(WorkItem.Get(record.WorkItem, string.Join(" ", violations)));
|
results.Add(WorkItem.Get(record, string.Join(" ", violations)));
|
||||||
}
|
}
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> GetWorkItemsNotMatching126169(Record record, ReadOnlyCollection<WorkItem> workItems)
|
private static ReadOnlyCollection<Record> GetWorkItemsNotMatching126169(Record record, ReadOnlyCollection<Record> records)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
foreach (WorkItem workItem in workItems)
|
foreach (Record r in records)
|
||||||
{
|
{
|
||||||
if (record.WorkItem.Priority is null)
|
if (record.WorkItem.Priority is null)
|
||||||
{
|
{
|
||||||
results.Add(record.WorkItem);
|
results.Add(record);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (workItem.Priority == record.WorkItem.Priority.Value)
|
if (r.WorkItem.Priority == record.WorkItem.Priority.Value)
|
||||||
continue;
|
continue;
|
||||||
results.Add(workItem);
|
results.Add(r);
|
||||||
}
|
}
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> FeatureCheckPriority126169(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyCollection<Record> records, string workItemType)
|
private static ReadOnlyCollection<Record> FeatureCheckPriority126169(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
|
Record record;
|
||||||
List<string> collection = new();
|
List<string> collection = new();
|
||||||
List<string> violations = new();
|
List<string> violations = new();
|
||||||
ReadOnlyCollection<WorkItem> childrenWorkItems;
|
ReadOnlyCollection<Record> records;
|
||||||
ReadOnlyCollection<WorkItem> workItemsNotMatching;
|
ReadOnlyCollection<Record> recordsNotMatching;
|
||||||
foreach (Record record in records)
|
foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs)
|
||||||
{
|
{
|
||||||
|
record = keyValuePair.Value;
|
||||||
if (record.WorkItem.State is "Removed")
|
if (record.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
if (record.WorkItem.WorkItemType != workItemType)
|
if (record.WorkItem.WorkItemType != workItemType)
|
||||||
continue;
|
continue;
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
violations.Clear();
|
violations.Clear();
|
||||||
if (record.Children.Count == 0)
|
if (record.Children.Length == 0)
|
||||||
continue;
|
continue;
|
||||||
childrenWorkItems = FilterChildren(workItemTypes, record);
|
records = FilterChildren(workItemTypes, record);
|
||||||
workItemsNotMatching = GetWorkItemsNotMatching126169(record, childrenWorkItems);
|
recordsNotMatching = GetWorkItemsNotMatching126169(record, records);
|
||||||
if (workItemsNotMatching.Count == 0)
|
if (recordsNotMatching.Count == 0)
|
||||||
continue;
|
continue;
|
||||||
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
collection.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
collection.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
collection.Add($"- [ ] [{workItem.Id}]({url}{workItem.Id}) {nameof(record.WorkItem.Priority)} != {record.WorkItem.Priority}");
|
collection.Add($"- [ ] [{r.WorkItem.Id}]({url}{r.WorkItem.Id}) {nameof(record.WorkItem.Priority)} != {record.WorkItem.Priority}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
lines.AddRange(collection);
|
lines.AddRange(collection);
|
||||||
violations.Add($"Priority:{record.WorkItem.Priority};");
|
violations.Add($"Priority:{record.WorkItem.Priority};");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
violations.Add($"<a target='_blank' href='{url}{workItem.Id}'>{workItem.Id}</a>:{workItem.Priority};");
|
violations.Add($"<a target='_blank' href='{url}{r.WorkItem.Id}'>{r.WorkItem.Id}</a>:{r.WorkItem.Priority};");
|
||||||
results.Add(WorkItem.Get(record.WorkItem, string.Join(" ", violations)));
|
results.Add(WorkItem.Get(record, string.Join(" ", violations)));
|
||||||
}
|
}
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> GetWorkItemsNotMatching123066(Record record, ReadOnlyCollection<WorkItem> workItems)
|
private static ReadOnlyCollection<Record> GetWorkItemsNotMatching123066(Record record, ReadOnlyCollection<Record> records)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
int check;
|
int check;
|
||||||
int state = GetState(record.WorkItem);
|
int state = GetState(record.WorkItem);
|
||||||
List<KeyValuePair<int, WorkItem>> collection = new();
|
List<KeyValuePair<int, Record>> collection = new();
|
||||||
foreach (WorkItem workItem in workItems)
|
foreach (Record r in records)
|
||||||
{
|
{
|
||||||
if (workItem.State is "Removed")
|
if (r.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
check = GetState(workItem);
|
check = GetState(r.WorkItem);
|
||||||
if (check == state)
|
if (check == state)
|
||||||
continue;
|
continue;
|
||||||
collection.Add(new(check, workItem));
|
collection.Add(new(check, r));
|
||||||
}
|
}
|
||||||
if (collection.Count > 0)
|
if (collection.Count > 0)
|
||||||
{
|
{
|
||||||
KeyValuePair<int, WorkItem>[] notNewState = (from l in collection where l.Value.State != "New" select l).ToArray();
|
KeyValuePair<int, Record>[] notNewState = (from l in collection where l.Value.WorkItem.State != "New" select l).ToArray();
|
||||||
if (notNewState.Length == 0 && record.WorkItem.State is "New" or "Active")
|
if (notNewState.Length == 0 && record.WorkItem.State is "New" or "Active")
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
else if (notNewState.Length > 0)
|
else if (notNewState.Length > 0)
|
||||||
@ -594,29 +610,29 @@ public class ProcessData : IProcessData
|
|||||||
collection.Clear();
|
collection.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (KeyValuePair<int, WorkItem> keyValuePair in collection.OrderByDescending(l => l.Key))
|
foreach (KeyValuePair<int, Record> keyValuePair in collection.OrderByDescending(l => l.Key))
|
||||||
results.Add(keyValuePair.Value);
|
results.Add(keyValuePair.Value);
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> GetWorkItemsNotMatching123067(Record record, ReadOnlyCollection<WorkItem> workItems)
|
private static ReadOnlyCollection<Record> GetWorkItemsNotMatching123067(Record record, ReadOnlyCollection<Record> records)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
int check;
|
int check;
|
||||||
int state = GetState(record.WorkItem);
|
int state = GetState(record.WorkItem);
|
||||||
List<KeyValuePair<int, WorkItem>> collection = new();
|
List<KeyValuePair<int, Record>> collection = new();
|
||||||
foreach (WorkItem workItem in workItems)
|
foreach (Record r in records)
|
||||||
{
|
{
|
||||||
if (workItem.State is "Removed")
|
if (r.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
check = GetState(workItem);
|
check = GetState(r.WorkItem);
|
||||||
if (check == state)
|
if (check == state)
|
||||||
continue;
|
continue;
|
||||||
collection.Add(new(check, workItem));
|
collection.Add(new(check, r));
|
||||||
}
|
}
|
||||||
if (collection.Count > 0)
|
if (collection.Count > 0)
|
||||||
{
|
{
|
||||||
KeyValuePair<int, WorkItem>[] notNewState = (from l in collection where l.Value.State != "New" select l).ToArray();
|
KeyValuePair<int, Record>[] notNewState = (from l in collection where l.Value.WorkItem.State != "New" select l).ToArray();
|
||||||
if (notNewState.Length == 0 && record.WorkItem.State is "New" or "Active")
|
if (notNewState.Length == 0 && record.WorkItem.State is "New" or "Active")
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
else if (notNewState.Length > 0)
|
else if (notNewState.Length > 0)
|
||||||
@ -630,139 +646,145 @@ public class ProcessData : IProcessData
|
|||||||
collection.Clear();
|
collection.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
foreach (KeyValuePair<int, WorkItem> keyValuePair in collection.OrderByDescending(l => l.Key))
|
foreach (KeyValuePair<int, Record> keyValuePair in collection.OrderByDescending(l => l.Key))
|
||||||
results.Add(keyValuePair.Value);
|
results.Add(keyValuePair.Value);
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> GetWorkItemsNotMatching122517(Record record, ReadOnlyCollection<WorkItem> workItems)
|
private static ReadOnlyCollection<Record> GetWorkItemsNotMatching122517(Record record, ReadOnlyCollection<Record> records)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
if (record.WorkItem.StartDate is null)
|
if (record.WorkItem.StartDate is null)
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
DateTime dateTime = record.WorkItem.StartDate.Value;
|
DateTime dateTime = record.WorkItem.StartDate.Value;
|
||||||
List<KeyValuePair<long, WorkItem>> collection = new();
|
List<KeyValuePair<long, Record>> collection = new();
|
||||||
foreach (WorkItem workItem in workItems)
|
foreach (Record r in records)
|
||||||
{
|
{
|
||||||
if (workItem.State is "Removed")
|
if (r.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
if (workItem.ActivatedDate is null)
|
if (r.WorkItem.ActivatedDate is null)
|
||||||
continue;
|
continue;
|
||||||
if (dateTime >= workItem.ActivatedDate.Value)
|
if (dateTime >= r.WorkItem.ActivatedDate.Value)
|
||||||
continue;
|
continue;
|
||||||
collection.Add(new(workItem.ActivatedDate.Value.Ticks, workItem));
|
collection.Add(new(r.WorkItem.ActivatedDate.Value.Ticks, r));
|
||||||
}
|
}
|
||||||
foreach (KeyValuePair<long, WorkItem> keyValuePair in collection.OrderByDescending(l => l.Key))
|
foreach (KeyValuePair<long, Record> keyValuePair in collection.OrderBy(l => l.Key))
|
||||||
results.Add(keyValuePair.Value);
|
results.Add(keyValuePair.Value);
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> FeatureCheckState123066(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyCollection<Record> records, string workItemType)
|
private static ReadOnlyCollection<Record> FeatureCheckState123066(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
|
Record record;
|
||||||
List<string> collection = new();
|
List<string> collection = new();
|
||||||
List<string> violations = new();
|
List<string> violations = new();
|
||||||
ReadOnlyCollection<WorkItem> childrenWorkItems;
|
ReadOnlyCollection<Record> records;
|
||||||
ReadOnlyCollection<WorkItem> workItemsNotMatching;
|
ReadOnlyCollection<Record> recordsNotMatching;
|
||||||
foreach (Record record in records)
|
foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs)
|
||||||
{
|
{
|
||||||
|
record = keyValuePair.Value;
|
||||||
if (record.WorkItem.State is "Removed")
|
if (record.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
if (record.WorkItem.WorkItemType != workItemType)
|
if (record.WorkItem.WorkItemType != workItemType)
|
||||||
continue;
|
continue;
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
violations.Clear();
|
violations.Clear();
|
||||||
if (record.Children.Count == 0)
|
if (record.Children.Length == 0)
|
||||||
continue;
|
continue;
|
||||||
childrenWorkItems = FilterChildren(workItemTypes, record);
|
records = FilterChildren(workItemTypes, record);
|
||||||
workItemsNotMatching = GetWorkItemsNotMatching123066(record, childrenWorkItems);
|
recordsNotMatching = GetWorkItemsNotMatching123066(record, records);
|
||||||
if (workItemsNotMatching.Count == 0)
|
if (recordsNotMatching.Count == 0)
|
||||||
continue;
|
continue;
|
||||||
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
collection.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
collection.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
collection.Add($"- [ ] [{workItem.Id}]({url}{workItem.Id}) {nameof(record.WorkItem.State)} != {record.WorkItem.State}");
|
collection.Add($"- [ ] [{r.WorkItem.Id}]({url}{r.WorkItem.Id}) {nameof(record.WorkItem.State)} != {record.WorkItem.State}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
lines.AddRange(collection);
|
lines.AddRange(collection);
|
||||||
violations.Add($"State:{record.WorkItem.State};");
|
violations.Add($"State:{record.WorkItem.State};");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
violations.Add($"<a target='_blank' href='{url}{workItem.Id}'>{workItem.Id}</a>:{workItem.State};");
|
violations.Add($"<a target='_blank' href='{url}{r.WorkItem.Id}'>{r.WorkItem.Id}</a>:{r.WorkItem.State};");
|
||||||
results.Add(WorkItem.Get(record.WorkItem, string.Join(" ", violations)));
|
results.Add(WorkItem.Get(record, string.Join(" ", violations)));
|
||||||
}
|
}
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> FeatureCheckState123067(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyCollection<Record> records, string workItemType)
|
private static ReadOnlyCollection<Record> FeatureCheckState123067(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
|
Record record;
|
||||||
List<string> collection = new();
|
List<string> collection = new();
|
||||||
List<string> violations = new();
|
List<string> violations = new();
|
||||||
ReadOnlyCollection<WorkItem> childrenWorkItems;
|
ReadOnlyCollection<Record> records;
|
||||||
ReadOnlyCollection<WorkItem> workItemsNotMatching;
|
ReadOnlyCollection<Record> recordsNotMatching;
|
||||||
foreach (Record record in records)
|
foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs)
|
||||||
{
|
{
|
||||||
|
record = keyValuePair.Value;
|
||||||
if (record.WorkItem.State is "Removed")
|
if (record.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
if (record.WorkItem.WorkItemType != workItemType)
|
if (record.WorkItem.WorkItemType != workItemType)
|
||||||
continue;
|
continue;
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
violations.Clear();
|
violations.Clear();
|
||||||
if (record.Children.Count == 0)
|
if (record.Children.Length == 0)
|
||||||
continue;
|
continue;
|
||||||
childrenWorkItems = FilterChildren(workItemTypes, record);
|
records = FilterChildren(workItemTypes, record);
|
||||||
workItemsNotMatching = GetWorkItemsNotMatching123067(record, childrenWorkItems);
|
recordsNotMatching = GetWorkItemsNotMatching123067(record, records);
|
||||||
if (workItemsNotMatching.Count == 0)
|
if (recordsNotMatching.Count == 0)
|
||||||
continue;
|
continue;
|
||||||
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
collection.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
collection.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
collection.Add($"- [ ] [{workItem.Id}]({url}{workItem.Id}) {nameof(record.WorkItem.State)} != {record.WorkItem.State}");
|
collection.Add($"- [ ] [{r.WorkItem.Id}]({url}{r.WorkItem.Id}) {nameof(record.WorkItem.State)} != {record.WorkItem.State}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
lines.AddRange(collection);
|
lines.AddRange(collection);
|
||||||
violations.Add($"State:{record.WorkItem.State};");
|
violations.Add($"State:{record.WorkItem.State};");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
violations.Add($"<a target='_blank' href='{url}{workItem.Id}'>{workItem.Id}</a>:{workItem.State};");
|
violations.Add($"<a target='_blank' href='{url}{r.WorkItem.Id}'>{r.WorkItem.Id}</a>:{r.WorkItem.State};");
|
||||||
results.Add(WorkItem.Get(record.WorkItem, string.Join(" ", violations)));
|
results.Add(WorkItem.Get(record, string.Join(" ", violations)));
|
||||||
}
|
}
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> FeatureCheckStart122517(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyCollection<Record> records, string workItemType)
|
private static ReadOnlyCollection<Record> FeatureCheckStart122517(string url, List<string> lines, ReadOnlyCollection<string> workItemTypes, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
|
||||||
{
|
{
|
||||||
List<WorkItem> results = new();
|
List<Record> results = new();
|
||||||
|
Record record;
|
||||||
List<string> collection = new();
|
List<string> collection = new();
|
||||||
List<string> violations = new();
|
List<string> violations = new();
|
||||||
ReadOnlyCollection<WorkItem> childrenWorkItems;
|
ReadOnlyCollection<Record> records;
|
||||||
ReadOnlyCollection<WorkItem> workItemsNotMatching;
|
ReadOnlyCollection<Record> recordsNotMatching;
|
||||||
foreach (Record record in records)
|
foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs)
|
||||||
{
|
{
|
||||||
|
record = keyValuePair.Value;
|
||||||
if (record.WorkItem.State is "Removed")
|
if (record.WorkItem.State is "Removed")
|
||||||
continue;
|
continue;
|
||||||
if (record.WorkItem.WorkItemType != workItemType)
|
if (record.WorkItem.WorkItemType != workItemType)
|
||||||
continue;
|
continue;
|
||||||
collection.Clear();
|
collection.Clear();
|
||||||
violations.Clear();
|
violations.Clear();
|
||||||
if (record.Children.Count == 0)
|
if (record.Children.Length == 0)
|
||||||
continue;
|
continue;
|
||||||
if (record.WorkItem.StartDate is null)
|
if (record.WorkItem.StartDate is null)
|
||||||
continue;
|
continue;
|
||||||
childrenWorkItems = FilterChildren(workItemTypes, record);
|
records = FilterChildren(workItemTypes, record);
|
||||||
workItemsNotMatching = GetWorkItemsNotMatching122517(record, childrenWorkItems);
|
recordsNotMatching = GetWorkItemsNotMatching122517(record, records);
|
||||||
if (workItemsNotMatching.Count == 0)
|
if (recordsNotMatching.Count == 0)
|
||||||
continue;
|
continue;
|
||||||
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
collection.Add($"## {record.WorkItem.AssignedTo} - {record.WorkItem.Id} - {record.WorkItem.Title}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
collection.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
collection.Add($"- [{record.WorkItem.Id}]({url}{record.WorkItem.Id})");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
collection.Add($"- [ ] [{workItem.Id}]({url}{workItem.Id}) {nameof(record.WorkItem.ActivatedDate)} != {record.WorkItem.ActivatedDate}");
|
collection.Add($"- [ ] [{r.WorkItem.Id}]({url}{r.WorkItem.Id}) {nameof(record.WorkItem.ActivatedDate)} != {record.WorkItem.ActivatedDate}");
|
||||||
collection.Add(string.Empty);
|
collection.Add(string.Empty);
|
||||||
lines.AddRange(collection);
|
lines.AddRange(collection);
|
||||||
violations.Add($"StartDate:{record.WorkItem.StartDate};");
|
violations.Add($"StartDate:{record.WorkItem.StartDate};");
|
||||||
foreach (WorkItem workItem in workItemsNotMatching)
|
foreach (Record r in recordsNotMatching)
|
||||||
violations.Add($"<a target='_blank' href='{url}{workItem.Id}'>{workItem.Id}</a>:{workItem.ActivatedDate};");
|
violations.Add($"<a target='_blank' href='{url}{r.WorkItem.Id}'>{r.WorkItem.Id}</a>:{r.WorkItem.ActivatedDate};");
|
||||||
results.Add(WorkItem.Get(record.WorkItem, string.Join(" ", violations)));
|
results.Add(WorkItem.Get(record, string.Join(" ", violations)));
|
||||||
}
|
}
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width" />
|
<meta name="viewport" content="width=device-width" />
|
||||||
<title>Infineon - 122517 - Children of a Feature should have the same priority</title>
|
<title>Infineon - 122517 - Feature start date should be min activated date of children</title>
|
||||||
<link href="/styles/bootstrap.min.css?no-cache=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-18-50" rel="stylesheet" />
|
<link href="/igniteui/css/themes/bootstrap3/default/infragistics.theme.css?v=2024-10-07-18-50" rel="stylesheet" />
|
||||||
<link href="/igniteui/css/structure/infragistics.css?v=2024-10-07-18-50" rel="stylesheet" />
|
<link href="/igniteui/css/structure/infragistics.css?v=2024-10-07-18-50" rel="stylesheet" />
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<span class="icon-bar"></span>
|
<span class="icon-bar"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="navbar-brand" style="min-width: 20px;">
|
<div class="navbar-brand" style="min-width: 20px;">
|
||||||
<span id="siteHeader"> </span> - 122517 - Children of a Feature should have the same priority
|
<span id="siteHeader"> </span> - 122517 - Feature start date should be min activated date of children
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-collapse collapse">
|
<div class="navbar-collapse collapse">
|
||||||
|
@ -59,7 +59,7 @@ What is the relative value to the Customer or business?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "business", "Value", "Business Value", "/markdown/PI4-Results/business.json?v=2024-10-07-18-50");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "business", "Value", "Business Value", "/markdown/PI4-Results/business.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "effort", "Effort", "Effort", "/markdown/PI4-Results/effort.json?v=2024-10-07-18-50");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "effort", "Effort", "Effort", "/markdown/PI4-Results/effort.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -31,12 +31,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-collapse collapse">
|
<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">
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
@ -59,7 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/json/work-items.json?v=2024-10-07-10-09");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2024-10-07-10-09");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -31,12 +31,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="navbar-collapse collapse">
|
<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">
|
<p class="navbar-text navbar-right">
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
@ -59,7 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/json/work-items.json?v=2024-10-07-10-09");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2024-10-07-10-09");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -59,7 +59,7 @@ What else does this do for our business?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "risk", "Risk", "Risk Reduction and/or Opportunity Enablement", "/markdown/PI4-Results/risk.json?v=2024-10-07-18-50");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "risk", "Risk", "Risk Reduction and/or Opportunity Enablement", "/markdown/PI4-Results/risk.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -60,7 +60,7 @@ How does user/business value decay over time?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "time", "Critical", "Time Criticality", "/markdown/PI4-Results/time.json?v=2024-10-07-18-50");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "time", "Critical", "Time Criticality", "/markdown/PI4-Results/time.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50");
|
initIndex("/markdown/bugs-user-stories-with-parents.json?v=2024-10-07-18-50");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2024-10-07-18-50", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
if (a.CoD === null || b.CoD === null) {
|
||||||
|
return b.Id - a.Id;
|
||||||
|
} else {
|
||||||
|
return b.CoD - a.CoD || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -73,15 +77,31 @@ function getPriority(workItemType, priority) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWorkItems(data) {
|
function getRecords(data) {
|
||||||
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
workItem = data[i];
|
parent = data[i].Parent;
|
||||||
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
continue;
|
continue;
|
||||||
|
if (workItem["RiskReductionMinusOpportunityEnablement"] === null || workItem["TimeCriticality"] === null || workItem["BusinessValue"] === null)
|
||||||
|
workItem["CoD"] === 0;
|
||||||
|
else
|
||||||
|
workItem["CoD"] === workItem["RiskReductionMinusOpportunityEnablement"] + workItem["TimeCriticality"] + workItem["BusinessValue"];
|
||||||
|
if (parent === null) {
|
||||||
|
workItem["ParentId"] = 9999999;
|
||||||
|
workItem["ParentTitle"] = null;
|
||||||
|
workItem["ParentState"] = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
workItem["ParentId"] = parent["Id"];
|
||||||
|
workItem["ParentTitle"] = parent["Title"];
|
||||||
|
workItem["ParentState"] = getState(parent["State"]);
|
||||||
|
}
|
||||||
workItem["State"] = getState(workItem["State"])
|
workItem["State"] = getState(workItem["State"])
|
||||||
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
||||||
workItems.push(workItem);
|
workItems.push(workItem);
|
||||||
@ -108,18 +128,20 @@ function updateSite() {
|
|||||||
function initIndex(url) {
|
function initIndex(url) {
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
||||||
var workItems = getWorkItems(data);
|
var records = getRecords(data);
|
||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
dataSource: workItems,
|
dataSource: records,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
primaryKey: "Id",
|
primaryKey: "Id",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
columns: [
|
columns: [
|
||||||
{ key: "Violation", dataType: "string", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
|
{ headerText: "Parent Id", key: "ParentId", dataType: "string" },
|
||||||
|
{ headerText: "Parent State", key: "ParentState", dataType: "string" },
|
||||||
{ key: "Id", dataType: "number" },
|
{ key: "Id", dataType: "number" },
|
||||||
{ key: "Requester", dataType: "string" },
|
{ key: "Requester", dataType: "string" },
|
||||||
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
||||||
@ -127,22 +149,24 @@ function initIndex(url) {
|
|||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
{ headerText: "Risk Reduction and/or Opportunity Enablement", key: "RiskReductionMinusOpportunityEnablement", dataType: "string" },
|
||||||
|
{ headerText: "Business Value", key: "BusinessValue", dataType: "number" },
|
||||||
|
{ headerText: "Time Criticality", key: "TimeCriticality", dataType: "number" },
|
||||||
|
{ headerText: "Effort", key: "Effort", dataType: "number" },
|
||||||
|
{ headerText: "Weighted Shortest Job First", key: "WeightedShortestJobFirst", dataType: "number" },
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
{ key: "StartDate", dataType: "string", hidden: true },
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
if (a.CoD === null || b.CoD === null) {
|
||||||
|
return b.Id - a.Id;
|
||||||
|
} else {
|
||||||
|
return b.CoD - a.CoD || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -73,15 +77,31 @@ function getPriority(workItemType, priority) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWorkItems(data) {
|
function getRecords(data) {
|
||||||
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
workItem = data[i];
|
parent = data[i].Parent;
|
||||||
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
continue;
|
continue;
|
||||||
|
if (workItem["RiskReductionMinusOpportunityEnablement"] === null || workItem["TimeCriticality"] === null || workItem["BusinessValue"] === null)
|
||||||
|
workItem["CoD"] === 0;
|
||||||
|
else
|
||||||
|
workItem["CoD"] === workItem["RiskReductionMinusOpportunityEnablement"] + workItem["TimeCriticality"] + workItem["BusinessValue"];
|
||||||
|
if (parent === null) {
|
||||||
|
workItem["ParentId"] = 9999999;
|
||||||
|
workItem["ParentTitle"] = null;
|
||||||
|
workItem["ParentState"] = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
workItem["ParentId"] = parent["Id"];
|
||||||
|
workItem["ParentTitle"] = parent["Title"];
|
||||||
|
workItem["ParentState"] = getState(parent["State"]);
|
||||||
|
}
|
||||||
workItem["State"] = getState(workItem["State"])
|
workItem["State"] = getState(workItem["State"])
|
||||||
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
||||||
workItems.push(workItem);
|
workItems.push(workItem);
|
||||||
@ -108,18 +128,20 @@ function updateSite() {
|
|||||||
function initIndex(url) {
|
function initIndex(url) {
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
||||||
var workItems = getWorkItems(data);
|
var records = getRecords(data);
|
||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
dataSource: workItems,
|
dataSource: records,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
primaryKey: "Id",
|
primaryKey: "Id",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
columns: [
|
columns: [
|
||||||
{ key: "Violation", dataType: "string", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
|
{ headerText: "Parent Id", key: "ParentId", dataType: "string" },
|
||||||
|
{ headerText: "Parent State", key: "ParentState", dataType: "string" },
|
||||||
{ key: "Id", dataType: "number" },
|
{ key: "Id", dataType: "number" },
|
||||||
{ key: "Requester", dataType: "string" },
|
{ key: "Requester", dataType: "string" },
|
||||||
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
||||||
@ -127,22 +149,24 @@ function initIndex(url) {
|
|||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
{ headerText: "Risk Reduction and/or Opportunity Enablement", key: "RiskReductionMinusOpportunityEnablement", dataType: "string" },
|
||||||
|
{ headerText: "Business Value", key: "BusinessValue", dataType: "number" },
|
||||||
|
{ headerText: "Time Criticality", key: "TimeCriticality", dataType: "number" },
|
||||||
|
{ headerText: "Effort", key: "Effort", dataType: "number" },
|
||||||
|
{ headerText: "Weighted Shortest Job First", key: "WeightedShortestJobFirst", dataType: "number" },
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
{ key: "StartDate", dataType: "string", hidden: true },
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
if (a.CoD === null || b.CoD === null) {
|
||||||
|
return b.Id - a.Id;
|
||||||
|
} else {
|
||||||
|
return b.CoD - a.CoD || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -73,15 +77,31 @@ function getPriority(workItemType, priority) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWorkItems(data) {
|
function getRecords(data) {
|
||||||
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
workItem = data[i];
|
parent = data[i].Parent;
|
||||||
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
continue;
|
continue;
|
||||||
|
if (workItem["RiskReductionMinusOpportunityEnablement"] === null || workItem["TimeCriticality"] === null || workItem["BusinessValue"] === null)
|
||||||
|
workItem["CoD"] === 0;
|
||||||
|
else
|
||||||
|
workItem["CoD"] === workItem["RiskReductionMinusOpportunityEnablement"] + workItem["TimeCriticality"] + workItem["BusinessValue"];
|
||||||
|
if (parent === null) {
|
||||||
|
workItem["ParentId"] = 9999999;
|
||||||
|
workItem["ParentTitle"] = null;
|
||||||
|
workItem["ParentState"] = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
workItem["ParentId"] = parent["Id"];
|
||||||
|
workItem["ParentTitle"] = parent["Title"];
|
||||||
|
workItem["ParentState"] = getState(parent["State"]);
|
||||||
|
}
|
||||||
workItem["State"] = getState(workItem["State"])
|
workItem["State"] = getState(workItem["State"])
|
||||||
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
||||||
workItems.push(workItem);
|
workItems.push(workItem);
|
||||||
@ -108,18 +128,20 @@ function updateSite() {
|
|||||||
function initIndex(url) {
|
function initIndex(url) {
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
||||||
var workItems = getWorkItems(data);
|
var records = getRecords(data);
|
||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
dataSource: workItems,
|
dataSource: records,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
primaryKey: "Id",
|
primaryKey: "Id",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
columns: [
|
columns: [
|
||||||
{ key: "Violation", dataType: "string", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
|
{ headerText: "Parent Id", key: "ParentId", dataType: "string" },
|
||||||
|
{ headerText: "Parent State", key: "ParentState", dataType: "string" },
|
||||||
{ key: "Id", dataType: "number" },
|
{ key: "Id", dataType: "number" },
|
||||||
{ key: "Requester", dataType: "string" },
|
{ key: "Requester", dataType: "string" },
|
||||||
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
||||||
@ -127,22 +149,24 @@ function initIndex(url) {
|
|||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
{ headerText: "Risk Reduction and/or Opportunity Enablement", key: "RiskReductionMinusOpportunityEnablement", dataType: "string" },
|
||||||
|
{ headerText: "Business Value", key: "BusinessValue", dataType: "number" },
|
||||||
|
{ headerText: "Time Criticality", key: "TimeCriticality", dataType: "number" },
|
||||||
|
{ headerText: "Effort", key: "Effort", dataType: "number" },
|
||||||
|
{ headerText: "Weighted Shortest Job First", key: "WeightedShortestJobFirst", dataType: "number" },
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
{ key: "StartDate", dataType: "string", hidden: true },
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
if (a.CoD === null || b.CoD === null) {
|
||||||
|
return b.Id - a.Id;
|
||||||
|
} else {
|
||||||
|
return b.CoD - a.CoD || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -73,15 +77,31 @@ function getPriority(workItemType, priority) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWorkItems(data) {
|
function getRecords(data) {
|
||||||
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
workItem = data[i];
|
parent = data[i].Parent;
|
||||||
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
continue;
|
continue;
|
||||||
|
if (workItem["RiskReductionMinusOpportunityEnablement"] === null || workItem["TimeCriticality"] === null || workItem["BusinessValue"] === null)
|
||||||
|
workItem["CoD"] === 0;
|
||||||
|
else
|
||||||
|
workItem["CoD"] === workItem["RiskReductionMinusOpportunityEnablement"] + workItem["TimeCriticality"] + workItem["BusinessValue"];
|
||||||
|
if (parent === null) {
|
||||||
|
workItem["ParentId"] = 9999999;
|
||||||
|
workItem["ParentTitle"] = null;
|
||||||
|
workItem["ParentState"] = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
workItem["ParentId"] = parent["Id"];
|
||||||
|
workItem["ParentTitle"] = parent["Title"];
|
||||||
|
workItem["ParentState"] = getState(parent["State"]);
|
||||||
|
}
|
||||||
workItem["State"] = getState(workItem["State"])
|
workItem["State"] = getState(workItem["State"])
|
||||||
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
||||||
workItems.push(workItem);
|
workItems.push(workItem);
|
||||||
@ -108,18 +128,20 @@ function updateSite() {
|
|||||||
function initIndex(url) {
|
function initIndex(url) {
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
||||||
var workItems = getWorkItems(data);
|
var records = getRecords(data);
|
||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
dataSource: workItems,
|
dataSource: records,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
primaryKey: "Id",
|
primaryKey: "Id",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
columns: [
|
columns: [
|
||||||
{ key: "Violation", dataType: "string", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
|
{ headerText: "Parent Id", key: "ParentId", dataType: "string" },
|
||||||
|
{ headerText: "Parent State", key: "ParentState", dataType: "string" },
|
||||||
{ key: "Id", dataType: "number" },
|
{ key: "Id", dataType: "number" },
|
||||||
{ key: "Requester", dataType: "string" },
|
{ key: "Requester", dataType: "string" },
|
||||||
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
||||||
@ -127,22 +149,24 @@ function initIndex(url) {
|
|||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
{ headerText: "Risk Reduction and/or Opportunity Enablement", key: "RiskReductionMinusOpportunityEnablement", dataType: "string" },
|
||||||
|
{ headerText: "Business Value", key: "BusinessValue", dataType: "number" },
|
||||||
|
{ headerText: "Time Criticality", key: "TimeCriticality", dataType: "number" },
|
||||||
|
{ headerText: "Effort", key: "Effort", dataType: "number" },
|
||||||
|
{ headerText: "Weighted Shortest Job First", key: "WeightedShortestJobFirst", dataType: "number" },
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
{ key: "StartDate", dataType: "string", hidden: true },
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
if (a.CoD === null || b.CoD === null) {
|
||||||
|
return b.Id - a.Id;
|
||||||
|
} else {
|
||||||
|
return b.CoD - a.CoD || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -73,15 +77,31 @@ function getPriority(workItemType, priority) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWorkItems(data) {
|
function getRecords(data) {
|
||||||
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
workItem = data[i];
|
parent = data[i].Parent;
|
||||||
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
continue;
|
continue;
|
||||||
|
if (workItem["RiskReductionMinusOpportunityEnablement"] === null || workItem["TimeCriticality"] === null || workItem["BusinessValue"] === null)
|
||||||
|
workItem["CoD"] === 0;
|
||||||
|
else
|
||||||
|
workItem["CoD"] === workItem["RiskReductionMinusOpportunityEnablement"] + workItem["TimeCriticality"] + workItem["BusinessValue"];
|
||||||
|
if (parent === null) {
|
||||||
|
workItem["ParentId"] = 9999999;
|
||||||
|
workItem["ParentTitle"] = null;
|
||||||
|
workItem["ParentState"] = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
workItem["ParentId"] = parent["Id"];
|
||||||
|
workItem["ParentTitle"] = parent["Title"];
|
||||||
|
workItem["ParentState"] = getState(parent["State"]);
|
||||||
|
}
|
||||||
workItem["State"] = getState(workItem["State"])
|
workItem["State"] = getState(workItem["State"])
|
||||||
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
||||||
workItems.push(workItem);
|
workItems.push(workItem);
|
||||||
@ -108,18 +128,20 @@ function updateSite() {
|
|||||||
function initIndex(url) {
|
function initIndex(url) {
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
||||||
var workItems = getWorkItems(data);
|
var records = getRecords(data);
|
||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
dataSource: workItems,
|
dataSource: records,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
primaryKey: "Id",
|
primaryKey: "Id",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
columns: [
|
columns: [
|
||||||
{ key: "Violation", dataType: "string", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
|
{ headerText: "Parent Id", key: "ParentId", dataType: "string" },
|
||||||
|
{ headerText: "Parent State", key: "ParentState", dataType: "string" },
|
||||||
{ key: "Id", dataType: "number" },
|
{ key: "Id", dataType: "number" },
|
||||||
{ key: "Requester", dataType: "string" },
|
{ key: "Requester", dataType: "string" },
|
||||||
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
||||||
@ -127,22 +149,24 @@ function initIndex(url) {
|
|||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
{ headerText: "Risk Reduction and/or Opportunity Enablement", key: "RiskReductionMinusOpportunityEnablement", dataType: "string" },
|
||||||
|
{ headerText: "Business Value", key: "BusinessValue", dataType: "number" },
|
||||||
|
{ headerText: "Time Criticality", key: "TimeCriticality", dataType: "number" },
|
||||||
|
{ headerText: "Effort", key: "Effort", dataType: "number" },
|
||||||
|
{ headerText: "Weighted Shortest Job First", key: "WeightedShortestJobFirst", dataType: "number" },
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
{ key: "StartDate", dataType: "string", hidden: true },
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
if (a.CoD === null || b.CoD === null) {
|
||||||
|
return b.Id - a.Id;
|
||||||
|
} else {
|
||||||
|
return b.CoD - a.CoD || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -73,15 +77,31 @@ function getPriority(workItemType, priority) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWorkItems(data) {
|
function getRecords(data) {
|
||||||
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
workItem = data[i];
|
parent = data[i].Parent;
|
||||||
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
continue;
|
continue;
|
||||||
|
if (workItem["RiskReductionMinusOpportunityEnablement"] === null || workItem["TimeCriticality"] === null || workItem["BusinessValue"] === null)
|
||||||
|
workItem["CoD"] === 0;
|
||||||
|
else
|
||||||
|
workItem["CoD"] === workItem["RiskReductionMinusOpportunityEnablement"] + workItem["TimeCriticality"] + workItem["BusinessValue"];
|
||||||
|
if (parent === null) {
|
||||||
|
workItem["ParentId"] = 9999999;
|
||||||
|
workItem["ParentTitle"] = null;
|
||||||
|
workItem["ParentState"] = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
workItem["ParentId"] = parent["Id"];
|
||||||
|
workItem["ParentTitle"] = parent["Title"];
|
||||||
|
workItem["ParentState"] = getState(parent["State"]);
|
||||||
|
}
|
||||||
workItem["State"] = getState(workItem["State"])
|
workItem["State"] = getState(workItem["State"])
|
||||||
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
||||||
workItems.push(workItem);
|
workItems.push(workItem);
|
||||||
@ -108,18 +128,20 @@ function updateSite() {
|
|||||||
function initIndex(url) {
|
function initIndex(url) {
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
||||||
var workItems = getWorkItems(data);
|
var records = getRecords(data);
|
||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
dataSource: workItems,
|
dataSource: records,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
primaryKey: "Id",
|
primaryKey: "Id",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
columns: [
|
columns: [
|
||||||
{ key: "Violation", dataType: "string", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
|
{ headerText: "Parent Id", key: "ParentId", dataType: "string" },
|
||||||
|
{ headerText: "Parent State", key: "ParentState", dataType: "string" },
|
||||||
{ key: "Id", dataType: "number" },
|
{ key: "Id", dataType: "number" },
|
||||||
{ key: "Requester", dataType: "string" },
|
{ key: "Requester", dataType: "string" },
|
||||||
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
||||||
@ -127,22 +149,24 @@ function initIndex(url) {
|
|||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
{ headerText: "Risk Reduction and/or Opportunity Enablement", key: "RiskReductionMinusOpportunityEnablement", dataType: "string" },
|
||||||
|
{ headerText: "Business Value", key: "BusinessValue", dataType: "number" },
|
||||||
|
{ headerText: "Time Criticality", key: "TimeCriticality", dataType: "number" },
|
||||||
|
{ headerText: "Effort", key: "Effort", dataType: "number" },
|
||||||
|
{ headerText: "Weighted Shortest Job First", key: "WeightedShortestJobFirst", dataType: "number" },
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
{ key: "StartDate", dataType: "string", hidden: true },
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -115,7 +115,7 @@ function getWorkItems(data, dataB, description) {
|
|||||||
var parent;
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
parent = data[i].Parent;
|
parent = data[i].Parent;
|
||||||
workItem = data[i].WorkItem;
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.WorkItemType !== 'Feature')
|
if (workItem.WorkItemType !== 'Feature')
|
||||||
|
@ -115,7 +115,7 @@ function getWorkItems(data, dataB, description) {
|
|||||||
var parent;
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
parent = data[i].Parent;
|
parent = data[i].Parent;
|
||||||
workItem = data[i].WorkItem;
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.WorkItemType !== 'Feature')
|
if (workItem.WorkItemType !== 'Feature')
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
if (a.CoD === null || b.CoD === null) {
|
||||||
|
return b.Id - a.Id;
|
||||||
|
} else {
|
||||||
|
return b.CoD - a.CoD || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
if (rowData == null)
|
if (rowData == null)
|
||||||
return;
|
return;
|
||||||
var data = [];
|
var data = [];
|
||||||
data.push({ name: "ADO Edit", value: '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + rowData["Id"] + '">' + rowData["Id"] + '</a>' });
|
data.push({ name: "Edit in ADO", value: '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + rowData["Id"] + '">Edit in ADO ' + rowData["Id"] + '</a>' });
|
||||||
for (const property in rowData) {
|
for (const property in rowData) {
|
||||||
if (rowData[property] == null)
|
if (rowData[property] == null)
|
||||||
continue;
|
continue;
|
||||||
@ -73,37 +77,35 @@ function getPriority(workItemType, priority) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTimeCriticality(workItemType, timeCriticality) {
|
function getRecords(data) {
|
||||||
var result;
|
var parent;
|
||||||
if (workItemType === "Bug")
|
|
||||||
result = "0-Bug";
|
|
||||||
else if (timeCriticality == null || timeCriticality === 0)
|
|
||||||
result = "9-Null";
|
|
||||||
else if (timeCriticality === 1)
|
|
||||||
result = `${timeCriticality}-QSM`;
|
|
||||||
else if (timeCriticality === 2)
|
|
||||||
result = `${timeCriticality}-Qual`;
|
|
||||||
else if (timeCriticality === 3)
|
|
||||||
result = `${timeCriticality}-Eff`;
|
|
||||||
else
|
|
||||||
result = "8-Not";
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getWorkItems(data) {
|
|
||||||
var workItems = [];
|
|
||||||
var workItem;
|
var workItem;
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
var workItems = [];
|
||||||
workItem = data[i];
|
for (var i = 0; i < data.length; i++) {
|
||||||
if (workItem.AreaPath !== 'ART SPS\\LEO')
|
parent = data[i].Parent;
|
||||||
continue;
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
if (workItem.WorkItemType !== 'Feature' && workItem.WorkItemType !== 'Bug')
|
if (workItem.WorkItemType !== 'Feature' && workItem.WorkItemType !== 'Bug')
|
||||||
continue;
|
continue;
|
||||||
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
|
continue;
|
||||||
|
if (workItem["RiskReductionMinusOpportunityEnablement"] === null || workItem["TimeCriticality"] === null || workItem["BusinessValue"] === null)
|
||||||
|
workItem["CoD"] === 0;
|
||||||
|
else
|
||||||
|
workItem["CoD"] === workItem["RiskReductionMinusOpportunityEnablement"] + workItem["TimeCriticality"] + workItem["BusinessValue"];
|
||||||
|
if (parent === null) {
|
||||||
|
workItem["ParentId"] = 9999999;
|
||||||
|
workItem["ParentTitle"] = null;
|
||||||
|
workItem["ParentState"] = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
workItem["ParentId"] = parent["Id"];
|
||||||
|
workItem["ParentTitle"] = parent["Title"];
|
||||||
|
workItem["ParentState"] = getState(parent["State"]);
|
||||||
|
}
|
||||||
workItem["State"] = getState(workItem["State"])
|
workItem["State"] = getState(workItem["State"])
|
||||||
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
||||||
workItem["TimeCriticality"] = getTimeCriticality(workItem["WorkItemType"], workItem["TimeCriticality"])
|
|
||||||
workItems.push(workItem);
|
workItems.push(workItem);
|
||||||
}
|
}
|
||||||
workItems.sort(compareFunction);
|
workItems.sort(compareFunction);
|
||||||
@ -128,42 +130,45 @@ function updateSite() {
|
|||||||
function initIndex(url) {
|
function initIndex(url) {
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
||||||
var workItems = getWorkItems(data);
|
var records = getRecords(data);
|
||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
dataSource: workItems,
|
dataSource: records,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
primaryKey: "Id",
|
primaryKey: "Id",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
columns: [
|
columns: [
|
||||||
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
|
{ headerText: "Parent Id", key: "ParentId", dataType: "string" },
|
||||||
|
{ headerText: "Parent State", key: "ParentState", dataType: "string" },
|
||||||
{ key: "Id", dataType: "number" },
|
{ key: "Id", dataType: "number" },
|
||||||
{ key: "Requester", dataType: "string" },
|
{ key: "Requester", dataType: "string" },
|
||||||
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
||||||
{ key: "Title", dataType: "string", width: "20%" },
|
{ key: "Title", dataType: "string", width: "20%" },
|
||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ headerText: "Qual/Eff", key: "TimeCriticality", dataType: "string" },
|
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
{ headerText: "Risk Reduction and/or Opportunity Enablement", key: "RiskReductionMinusOpportunityEnablement", dataType: "string" },
|
||||||
|
{ headerText: "Business Value", key: "BusinessValue", dataType: "number" },
|
||||||
|
{ headerText: "Time Criticality", key: "TimeCriticality", dataType: "number" },
|
||||||
|
{ headerText: "Effort", key: "Effort", dataType: "number" },
|
||||||
|
{ headerText: "Weighted Shortest Job First", key: "WeightedShortestJobFirst", dataType: "number" },
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
{ key: "StartDate", dataType: "string", hidden: true },
|
||||||
{ key: "Violation", dataType: "string", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
if (a.CoD === null || b.CoD === null) {
|
||||||
|
return b.Id - a.Id;
|
||||||
|
} else {
|
||||||
|
return b.CoD - a.CoD || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -73,37 +77,35 @@ function getPriority(workItemType, priority) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTimeCriticality(workItemType, timeCriticality) {
|
|
||||||
var result;
|
|
||||||
if (workItemType === "Bug")
|
|
||||||
result = "0-Bug";
|
|
||||||
else if (timeCriticality == null || timeCriticality === 0)
|
|
||||||
result = "9-Null";
|
|
||||||
else if (timeCriticality === 1)
|
|
||||||
result = `${timeCriticality}-QSM`;
|
|
||||||
else if (timeCriticality === 2)
|
|
||||||
result = `${timeCriticality}-Qual`;
|
|
||||||
else if (timeCriticality === 3)
|
|
||||||
result = `${timeCriticality}-Eff`;
|
|
||||||
else
|
|
||||||
result = "8-Not";
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getRecords(data) {
|
function getRecords(data) {
|
||||||
var workItems = [];
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
var workItems = [];
|
||||||
workItem = data[i];
|
for (var i = 0; i < data.length; i++) {
|
||||||
if (workItem.AreaPath !== 'ART SPS\\MES')
|
parent = data[i].Parent;
|
||||||
continue;
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
if (workItem.WorkItemType !== 'Feature' && workItem.WorkItemType !== 'Bug')
|
if (workItem.WorkItemType !== 'Feature' && workItem.WorkItemType !== 'Bug')
|
||||||
continue;
|
continue;
|
||||||
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
|
continue;
|
||||||
|
if (workItem["RiskReductionMinusOpportunityEnablement"] === null || workItem["TimeCriticality"] === null || workItem["BusinessValue"] === null)
|
||||||
|
workItem["CoD"] === 0;
|
||||||
|
else
|
||||||
|
workItem["CoD"] === workItem["RiskReductionMinusOpportunityEnablement"] + workItem["TimeCriticality"] + workItem["BusinessValue"];
|
||||||
|
if (parent === null) {
|
||||||
|
workItem["ParentId"] = 9999999;
|
||||||
|
workItem["ParentTitle"] = null;
|
||||||
|
workItem["ParentState"] = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
workItem["ParentId"] = parent["Id"];
|
||||||
|
workItem["ParentTitle"] = parent["Title"];
|
||||||
|
workItem["ParentState"] = getState(parent["State"]);
|
||||||
|
}
|
||||||
workItem["State"] = getState(workItem["State"])
|
workItem["State"] = getState(workItem["State"])
|
||||||
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
workItem["Priority"] = getPriority(workItem["WorkItemType"], workItem["Priority"])
|
||||||
workItem["TimeCriticality"] = getTimeCriticality(workItem["WorkItemType"], workItem["TimeCriticality"])
|
|
||||||
workItems.push(workItem);
|
workItems.push(workItem);
|
||||||
}
|
}
|
||||||
workItems.sort(compareFunction);
|
workItems.sort(compareFunction);
|
||||||
@ -128,42 +130,45 @@ function updateSite() {
|
|||||||
function initIndex(url) {
|
function initIndex(url) {
|
||||||
updateSite();
|
updateSite();
|
||||||
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
$.getJSON(url, { _: new Date().getTime() }, function (data) {
|
||||||
var workItems = getRecords(data);
|
var records = getRecords(data);
|
||||||
console.log(data.length);
|
console.log(data.length);
|
||||||
if (data.length > 0)
|
if (data.length > 0)
|
||||||
console.log(data[0]);
|
console.log(data[0]);
|
||||||
$("#HeaderGrid").igGrid({
|
$("#HeaderGrid").igGrid({
|
||||||
autoGenerateColumns: false,
|
autoGenerateColumns: false,
|
||||||
dataSource: workItems,
|
dataSource: records,
|
||||||
height: "100%",
|
height: "100%",
|
||||||
primaryKey: "Id",
|
primaryKey: "Id",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
columns: [
|
columns: [
|
||||||
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
|
{ headerText: "Parent Id", key: "ParentId", dataType: "string" },
|
||||||
|
{ headerText: "Parent State", key: "ParentState", dataType: "string" },
|
||||||
{ key: "Id", dataType: "number" },
|
{ key: "Id", dataType: "number" },
|
||||||
{ key: "Requester", dataType: "string" },
|
{ key: "Requester", dataType: "string" },
|
||||||
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
{ headerText: "Assigned To", key: "AssignedTo", dataType: "string" },
|
||||||
{ key: "Title", dataType: "string", width: "20%" },
|
{ key: "Title", dataType: "string", width: "20%" },
|
||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ headerText: "Qual/Eff", key: "TimeCriticality", dataType: "string" },
|
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
{ headerText: "Risk Reduction and/or Opportunity Enablement", key: "RiskReductionMinusOpportunityEnablement", dataType: "string" },
|
||||||
|
{ headerText: "Business Value", key: "BusinessValue", dataType: "number" },
|
||||||
|
{ headerText: "Time Criticality", key: "TimeCriticality", dataType: "number" },
|
||||||
|
{ headerText: "Effort", key: "Effort", dataType: "number" },
|
||||||
|
{ headerText: "Weighted Shortest Job First", key: "WeightedShortestJobFirst", dataType: "number" },
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
{ key: "StartDate", dataType: "string", hidden: true },
|
||||||
{ key: "Violation", dataType: "string", hidden: true },
|
{ key: "Violation", dataType: "string", hidden: true },
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -115,7 +115,7 @@ function getWorkItems(data, dataB, description) {
|
|||||||
var parent;
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
parent = data[i].Parent;
|
parent = data[i].Parent;
|
||||||
workItem = data[i].WorkItem;
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.WorkItemType !== 'Feature')
|
if (workItem.WorkItemType !== 'Feature')
|
||||||
|
@ -115,7 +115,7 @@ function getWorkItems(data, dataB, description) {
|
|||||||
var parent;
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
parent = data[i].Parent;
|
parent = data[i].Parent;
|
||||||
workItem = data[i].WorkItem;
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.WorkItemType !== 'Feature')
|
if (workItem.WorkItemType !== 'Feature')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
function compareFunction(a, b) {
|
function compareFunction(a, b) {
|
||||||
return a.Priority[0] - b.Priority[0] || a.TimeCriticality[0] - b.TimeCriticality[0] || b.State[0] - a.State[0] || a.Id - b.Id;
|
return b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
function showOne(rowData) {
|
function showOne(rowData) {
|
||||||
@ -77,13 +77,13 @@ function getWorkItems(data) {
|
|||||||
var parent;
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
parent = data[i].Parent;
|
parent = data[i].Parent;
|
||||||
workItem = data[i].WorkItem;
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.WorkItemType !== 'User Story' && workItem.WorkItemType !== 'Bug')
|
|
||||||
continue;
|
|
||||||
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
|
||||||
continue;
|
continue;
|
||||||
|
if (workItem.WorkItemType !== 'User Story' && workItem.WorkItemType !== 'Bug')
|
||||||
|
continue;
|
||||||
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
if ((window.location.href.indexOf('=LEO') > -1 && workItem.AreaPath !== 'ART SPS\\LEO') || (window.location.href.indexOf('=MES') > -1 && workItem.AreaPath !== 'ART SPS\\MES'))
|
||||||
continue;
|
continue;
|
||||||
if (parent === null) {
|
if (parent === null) {
|
||||||
@ -143,23 +143,15 @@ function initIndex(url) {
|
|||||||
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
{ headerText: "System(s)", key: "Tags", dataType: "string" },
|
||||||
{ key: "Priority", dataType: "string" },
|
{ key: "Priority", dataType: "string" },
|
||||||
{ key: "State", dataType: "string" },
|
{ key: "State", dataType: "string" },
|
||||||
{ headerText: "Effort in Days", key: "Effort", dataType: "number" },
|
|
||||||
{ headerText: "UAT as of", key: "ResolvedDate", dataType: "date", format: "date" },
|
|
||||||
{ headerText: "CMP Date", key: "ClosedDate", dataType: "date", format: "date" },
|
|
||||||
{ headerText: "Target", key: "TargetDate", dataType: "date", format: "date" },
|
|
||||||
{ key: "ParentTitle", dataType: "string", hidden: true },
|
{ key: "ParentTitle", dataType: "string", hidden: true },
|
||||||
{ key: "AreaPath", dataType: "string", hidden: true },
|
{ key: "AreaPath", dataType: "string", hidden: true },
|
||||||
{ key: "AssignedTo", dataType: "string", hidden: true },
|
{ key: "AssignedTo", dataType: "string", hidden: true },
|
||||||
{ key: "BusinessValue", dataType: "number", hidden: true },
|
|
||||||
{ key: "ChangedDate", dataType: "string", hidden: true },
|
{ key: "ChangedDate", dataType: "string", hidden: true },
|
||||||
{ key: "CommentCount", dataType: "number", hidden: true },
|
{ key: "CommentCount", dataType: "number", hidden: true },
|
||||||
{ key: "CreatedDate", dataType: "string", hidden: true },
|
{ key: "CreatedDate", dataType: "string", hidden: true },
|
||||||
{ key: "Description", dataType: "string", hidden: true },
|
{ key: "Description", dataType: "string", hidden: true },
|
||||||
{ key: "IterationPath", dataType: "string", hidden: true },
|
{ key: "IterationPath", dataType: "string", hidden: true },
|
||||||
{ key: "Revision", dataType: "number", hidden: true },
|
{ key: "Revision", dataType: "number", hidden: true },
|
||||||
{ key: "RiskReductionMinusOpportunityEnablement", dataType: "string", hidden: true },
|
|
||||||
{ key: "StartDate", dataType: "string", hidden: true },
|
|
||||||
{ key: "WeightedShortestJobFirst", dataType: "number", hidden: true },
|
|
||||||
{ key: "WorkItemType", dataType: "string", hidden: true },
|
{ key: "WorkItemType", dataType: "string", hidden: true },
|
||||||
],
|
],
|
||||||
features: [
|
features: [
|
||||||
|
@ -79,7 +79,7 @@ function getWorkItems(data) {
|
|||||||
var parent;
|
var parent;
|
||||||
var workItem;
|
var workItem;
|
||||||
var workItems = [];
|
var workItems = [];
|
||||||
for (var i = data.length - 1; i > -1; i--) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
parent = data[i].Parent;
|
parent = data[i].Parent;
|
||||||
workItem = data[i].WorkItem;
|
workItem = data[i].WorkItem;
|
||||||
if (workItem.WorkItemType !== 'Feature')
|
if (workItem.WorkItemType !== 'Feature')
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Adaptation.FileHandlers.json.WorkItems;
|
namespace Adaptation.FileHandlers.json.WorkItems;
|
||||||
|
|
||||||
@ -7,7 +9,8 @@ public class Record
|
|||||||
|
|
||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
public Record(WorkItem workItem, WorkItem? parent, ReadOnlyCollection<Record> children)
|
[JsonConstructor]
|
||||||
|
public Record(WorkItem workItem, WorkItem? parent, Record[] children)
|
||||||
{
|
{
|
||||||
WorkItem = workItem;
|
WorkItem = workItem;
|
||||||
Parent = parent;
|
Parent = parent;
|
||||||
@ -16,6 +19,9 @@ public class Record
|
|||||||
|
|
||||||
public WorkItem WorkItem { get; set; }
|
public WorkItem WorkItem { get; set; }
|
||||||
public WorkItem? Parent { get; set; }
|
public WorkItem? Parent { get; set; }
|
||||||
public ReadOnlyCollection<Record> Children { get; set; }
|
public Record[] Children { get; set; }
|
||||||
|
|
||||||
|
public static Record Get(WorkItem workItem, WorkItem? parent, ReadOnlyCollection<Record> children) =>
|
||||||
|
new(workItem, parent, children.ToArray());
|
||||||
|
|
||||||
}
|
}
|
@ -70,36 +70,38 @@ public class WorkItem
|
|||||||
|
|
||||||
public override string ToString() => $"{Id} - {WorkItemType} - {Title}";
|
public override string ToString() => $"{Id} - {WorkItemType} - {Title}";
|
||||||
|
|
||||||
public static WorkItem Get(WorkItem workItem, string? violation)
|
public static Record Get(Record record, string? violation)
|
||||||
{
|
{
|
||||||
WorkItem result = new(workItem.ActivatedDate,
|
Record result;
|
||||||
workItem.AreaPath,
|
WorkItem workItem = new(record.WorkItem.ActivatedDate,
|
||||||
workItem.AssignedTo,
|
record.WorkItem.AreaPath,
|
||||||
workItem.BusinessValue,
|
record.WorkItem.AssignedTo,
|
||||||
workItem.ChangedDate,
|
record.WorkItem.BusinessValue,
|
||||||
workItem.ClosedDate,
|
record.WorkItem.ChangedDate,
|
||||||
workItem.CommentCount,
|
record.WorkItem.ClosedDate,
|
||||||
workItem.CreatedDate,
|
record.WorkItem.CommentCount,
|
||||||
workItem.Description,
|
record.WorkItem.CreatedDate,
|
||||||
workItem.Effort,
|
record.WorkItem.Description,
|
||||||
workItem.Id,
|
record.WorkItem.Effort,
|
||||||
workItem.IterationPath,
|
record.WorkItem.Id,
|
||||||
workItem.Parent,
|
record.WorkItem.IterationPath,
|
||||||
workItem.Priority,
|
record.WorkItem.Parent,
|
||||||
workItem.Relations,
|
record.WorkItem.Priority,
|
||||||
workItem.Requester,
|
record.WorkItem.Relations,
|
||||||
workItem.ResolvedDate,
|
record.WorkItem.Requester,
|
||||||
workItem.Revision,
|
record.WorkItem.ResolvedDate,
|
||||||
workItem.RiskReductionMinusOpportunityEnablement,
|
record.WorkItem.Revision,
|
||||||
workItem.StartDate,
|
record.WorkItem.RiskReductionMinusOpportunityEnablement,
|
||||||
workItem.State,
|
record.WorkItem.StartDate,
|
||||||
workItem.Tags,
|
record.WorkItem.State,
|
||||||
workItem.TargetDate,
|
record.WorkItem.Tags,
|
||||||
workItem.TimeCriticality,
|
record.WorkItem.TargetDate,
|
||||||
workItem.Title,
|
record.WorkItem.TimeCriticality,
|
||||||
workItem.Violation is null ? violation : workItem.Violation,
|
record.WorkItem.Title,
|
||||||
workItem.WeightedShortestJobFirst,
|
record.WorkItem.Violation is null ? violation : record.WorkItem.Violation,
|
||||||
workItem.WorkItemType);
|
record.WorkItem.WeightedShortestJobFirst,
|
||||||
|
record.WorkItem.WorkItemType);
|
||||||
|
result = new(workItem, record.Parent, Array.Empty<Record>());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,60 +76,60 @@ public class MESAFIBACKLOG
|
|||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ReadOnlyCollection<WorkItem> GetWorkItems(FileInfo fileInfo)
|
private static ReadOnlyCollection<Record> GetRecords(FileInfo fileInfo)
|
||||||
{
|
{
|
||||||
WorkItem[] results;
|
Record[] results;
|
||||||
string json = File.ReadAllText(fileInfo.FullName);
|
string json = File.ReadAllText(fileInfo.FullName);
|
||||||
results = JsonSerializer.Deserialize<WorkItem[]>(json);
|
results = JsonSerializer.Deserialize<Record[]>(json);
|
||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Verify122508(FileInfo fileInfo)
|
private static void Verify122508(FileInfo fileInfo)
|
||||||
{
|
{
|
||||||
ReadOnlyCollection<WorkItem> workItems = GetWorkItems(fileInfo);
|
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||||
Assert.IsNotNull(workItems);
|
Assert.IsNotNull(records);
|
||||||
// Assert.IsTrue(workItems.Count == 10);
|
// Assert.IsTrue(records.Count == 10);
|
||||||
// Assert.IsTrue(workItems.Count == 6);
|
// Assert.IsTrue(records.Count == 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Verify122514(FileInfo fileInfo)
|
private static void Verify122514(FileInfo fileInfo)
|
||||||
{
|
{
|
||||||
ReadOnlyCollection<WorkItem> workItems = GetWorkItems(fileInfo);
|
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||||
Assert.IsNotNull(workItems);
|
Assert.IsNotNull(records);
|
||||||
// Assert.IsTrue(workItems.Count == 25);
|
// Assert.IsTrue(records.Count == 25);
|
||||||
// Assert.IsTrue(workItems.Count == 6);
|
// Assert.IsTrue(records.Count == 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Verify126169(FileInfo fileInfo)
|
private static void Verify126169(FileInfo fileInfo)
|
||||||
{
|
{
|
||||||
ReadOnlyCollection<WorkItem> workItems = GetWorkItems(fileInfo);
|
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||||
Assert.IsNotNull(workItems);
|
Assert.IsNotNull(records);
|
||||||
// Assert.IsTrue(workItems.Count == 1);
|
// Assert.IsTrue(records.Count == 1);
|
||||||
// Assert.IsTrue(workItems.Count == 1);
|
// Assert.IsTrue(records.Count == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Verify123066(FileInfo fileInfo)
|
private static void Verify123066(FileInfo fileInfo)
|
||||||
{
|
{
|
||||||
ReadOnlyCollection<WorkItem> workItems = GetWorkItems(fileInfo);
|
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||||
Assert.IsNotNull(workItems);
|
Assert.IsNotNull(records);
|
||||||
// Assert.IsTrue(workItems.Count == 24);
|
// Assert.IsTrue(records.Count == 24);
|
||||||
// Assert.IsTrue(workItems.Count == 5);
|
// Assert.IsTrue(records.Count == 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Verify123067(FileInfo fileInfo)
|
private static void Verify123067(FileInfo fileInfo)
|
||||||
{
|
{
|
||||||
ReadOnlyCollection<WorkItem> workItems = GetWorkItems(fileInfo);
|
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||||
Assert.IsNotNull(workItems);
|
Assert.IsNotNull(records);
|
||||||
// Assert.IsTrue(workItems.Count == 24);
|
// Assert.IsTrue(records.Count == 24);
|
||||||
// Assert.IsTrue(workItems.Count == 5);
|
// Assert.IsTrue(records.Count == 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void Verify122517(FileInfo fileInfo)
|
private static void Verify122517(FileInfo fileInfo)
|
||||||
{
|
{
|
||||||
ReadOnlyCollection<WorkItem> workItems = GetWorkItems(fileInfo);
|
ReadOnlyCollection<Record> records = GetRecords(fileInfo);
|
||||||
Assert.IsNotNull(workItems);
|
Assert.IsNotNull(records);
|
||||||
// Assert.IsTrue(workItems.Count == 14);
|
// Assert.IsTrue(records.Count == 14);
|
||||||
// Assert.IsTrue(workItems.Count == 14);
|
// Assert.IsTrue(records.Count == 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
Reference in New Issue
Block a user