Switch from oi-metrology-viewer-prod.mes.infineon.com:4438
New Markdown for Total StoryPoints by iteration and assigned to
This commit is contained in:
parent
c3b309347c
commit
9769e1e106
@ -84,6 +84,7 @@ public class ProcessData : IProcessData
|
|||||||
ReadOnlyCollection<Record> results;
|
ReadOnlyCollection<Record> results;
|
||||||
ReadOnlyDictionary<int, Record> keyValuePairs = GetWorkItems(workItems, keepRelations);
|
ReadOnlyDictionary<int, Record> keyValuePairs = GetWorkItems(workItems, keepRelations);
|
||||||
ReadOnlyCollection<Record> records = new(keyValuePairs.Values.ToArray());
|
ReadOnlyCollection<Record> records = new(keyValuePairs.Values.ToArray());
|
||||||
|
ReadOnlyCollection<string> userStoryWorkItemTypes = new(new string[] { "User Story" });
|
||||||
ReadOnlyCollection<string> bugFeatureWorkItemTypes = new(new string[] { "Bug", "Feature" });
|
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" });
|
||||||
@ -154,6 +155,15 @@ public class ProcessData : IProcessData
|
|||||||
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-122517");
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-122517");
|
||||||
_Details.Add(results);
|
_Details.Add(results);
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
lines.Clear();
|
||||||
|
string workItemType = "User Story";
|
||||||
|
lines.Add($"# {nameof(UserStoryCheckIterationPath228385)}");
|
||||||
|
lines.Add(string.Empty);
|
||||||
|
results = UserStoryCheckIterationPath228385(url, lines, userStoryWorkItemTypes, keyValuePairs, workItemType);
|
||||||
|
WriteFiles(fileRead, destinationDirectory, fileInfoCollection, new(lines), results, "check-228385");
|
||||||
|
_Details.Add(results);
|
||||||
|
}
|
||||||
if (messages.Count > 0)
|
if (messages.Count > 0)
|
||||||
throw new Exception($"{messages.Count}{Environment.NewLine}{string.Join(Environment.NewLine, messages)}");
|
throw new Exception($"{messages.Count}{Environment.NewLine}{string.Join(Environment.NewLine, messages)}");
|
||||||
}
|
}
|
||||||
@ -758,4 +768,71 @@ public class ProcessData : IProcessData
|
|||||||
return new(results);
|
return new(results);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static ReadOnlyDictionary<string, List<Record>> GetWorkItemsMatching228385(ReadOnlyCollection<Record> records)
|
||||||
|
{
|
||||||
|
Dictionary<string, List<Record>> results = new();
|
||||||
|
string key;
|
||||||
|
List<Record>? collection;
|
||||||
|
foreach (Record record in records)
|
||||||
|
{
|
||||||
|
key = $"{record.WorkItem.IterationPath}-{record.WorkItem.AssignedTo}";
|
||||||
|
if (!results.TryGetValue(key, out collection))
|
||||||
|
{
|
||||||
|
results.Add(key, new());
|
||||||
|
if (!results.TryGetValue(key, out collection))
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
collection.Add(record);
|
||||||
|
}
|
||||||
|
return new(results);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ReadOnlyDictionary<string, List<Record>> GetWorkItemsMatching228385(ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
|
||||||
|
{
|
||||||
|
ReadOnlyDictionary<string, List<Record>> results;
|
||||||
|
Record record;
|
||||||
|
List<Record> records = new();
|
||||||
|
foreach (KeyValuePair<int, Record> keyValuePair in keyValuePairs)
|
||||||
|
{
|
||||||
|
record = keyValuePair.Value;
|
||||||
|
if (record.WorkItem.State is "Removed" or "Closed")
|
||||||
|
continue;
|
||||||
|
if (!record.WorkItem.IterationPath.Contains('\\'))
|
||||||
|
continue;
|
||||||
|
if (record.WorkItem.StoryPoints is null)
|
||||||
|
continue;
|
||||||
|
if (record.WorkItem.WorkItemType != workItemType)
|
||||||
|
continue;
|
||||||
|
records.Add(record);
|
||||||
|
}
|
||||||
|
Record[] sorted = records.OrderByDescending(l => l.WorkItem.IterationPath).ToArray();
|
||||||
|
results = GetWorkItemsMatching228385(new(sorted));
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static ReadOnlyCollection<Record> UserStoryCheckIterationPath228385(string url, List<string> lines, ReadOnlyCollection<string> _, ReadOnlyDictionary<int, Record> keyValuePairs, string workItemType)
|
||||||
|
{
|
||||||
|
List<Record> results = new();
|
||||||
|
long totalStoryPoints;
|
||||||
|
ReadOnlyDictionary<string, List<Record>> records = GetWorkItemsMatching228385(keyValuePairs, workItemType);
|
||||||
|
foreach (KeyValuePair<string, List<Record>> keyValuePair in records)
|
||||||
|
{
|
||||||
|
totalStoryPoints = 0;
|
||||||
|
foreach (Record record in keyValuePair.Value)
|
||||||
|
{
|
||||||
|
if (record.WorkItem.StoryPoints is null)
|
||||||
|
continue;
|
||||||
|
totalStoryPoints += record.WorkItem.StoryPoints.Value;
|
||||||
|
}
|
||||||
|
lines.Add($"## {keyValuePair.Key} => {totalStoryPoints}");
|
||||||
|
lines.Add(string.Empty);
|
||||||
|
foreach (Record record in keyValuePair.Value)
|
||||||
|
{
|
||||||
|
lines.Add($"- [ ] [{record.WorkItem.Id}]({url}{record.WorkItem.Id}) - {record.WorkItem.Title}");
|
||||||
|
lines.Add(string.Empty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new(results);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -59,7 +59,7 @@ What is the relative value to the Customer or business?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "business", "Value", "Business Value", "/markdown/PI5-Results/business.json?v=2025-01-22-10-49");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://eaf-dev.mes.infineon.com/api/v1/ado/", "business", "Value", "Business Value", "/markdown/PI5-Results/business.json?v=2025-01-22-10-49");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
const fromHtml = true;
|
const fromHtml = true;
|
||||||
const signalRUrl = "/signalr";
|
const signalRUrl = "/signalr";
|
||||||
const windowLocationHRef = window.location.href;
|
const windowLocationHRef = window.location.href;
|
||||||
const apiUrl = "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/";
|
const apiUrl = "https://eaf-dev.mes.infineon.com/api/v1/ado/";
|
||||||
const workItems = {
|
const workItems = {
|
||||||
a: "/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49",
|
a: "/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49",
|
||||||
b: "/markdown/{[]}.json?v=2025-01-22-10-49"
|
b: "/markdown/{[]}.json?v=2025-01-22-10-49"
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
th: "Cost of Delay (CoD)",
|
th: "Cost of Delay (CoD)",
|
||||||
span: "Cost of Delay (CoD) is the money lost by delaying or not doing a job for a specific time. It's a measure of the economic value of a job over time."
|
span: "Cost of Delay (CoD) is the money lost by delaying or not doing a job for a specific time. It's a measure of the economic value of a job over time."
|
||||||
};
|
};
|
||||||
initIndex(fromHtml, windowLocationHRef, headerGrid, workItems, b, r, t, c, "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/");
|
initIndex(fromHtml, windowLocationHRef, headerGrid, workItems, b, r, t, c, "https://eaf-dev.mes.infineon.com/api/v1/ado/");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "effort", "Effort", "Effort", "/markdown/PI5-Results/effort.json?v=2025-01-22-10-49");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://eaf-dev.mes.infineon.com/api/v1/ado/", "effort", "Effort", "Effort", "/markdown/PI5-Results/effort.json?v=2025-01-22-10-49");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -59,7 +59,7 @@ What else does this do for our business?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "risk", "Risk", "Risk Reduction and/or Opportunity Enablement", "/markdown/PI5-Results/risk.json?v=2025-01-22-10-49");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://eaf-dev.mes.infineon.com/api/v1/ado/", "risk", "Risk", "Risk Reduction and/or Opportunity Enablement", "/markdown/PI5-Results/risk.json?v=2025-01-22-10-49");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -59,7 +59,7 @@ How does user/business value decay over time?
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/", "time", "Critical", "Time Criticality", "/markdown/PI5-Results/time.json?v=2025-01-22-10-49");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://eaf-dev.mes.infineon.com/api/v1/ado/", "time", "Critical", "Time Criticality", "/markdown/PI5-Results/time.json?v=2025-01-22-10-49");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://eaf-dev.mes.infineon.com/api/v1/ado/");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/signalr", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/");
|
initIndex("/signalr", "https://eaf-dev.mes.infineon.com/api/v1/ado/");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/");
|
initIndex("/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49", "https://eaf-dev.mes.infineon.com/api/v1/ado/");
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -17058,7 +17058,7 @@ if (typeof document == 'undefined') {
|
|||||||
const machineId = '';
|
const machineId = '';
|
||||||
const fromHtml = false;
|
const fromHtml = false;
|
||||||
const signalRUrl = "/signalr";
|
const signalRUrl = "/signalr";
|
||||||
const apiUrl = "https://oi-metrology-viewer-prod.mes.infineon.com:4438/api/v1/ado/";
|
const apiUrl = "https://eaf-dev.mes.infineon.com/api/v1/ado/";
|
||||||
const windowLocationHRef = "https://eaf-dev.mes.infineon.com/html/cod.html?site=MES";
|
const windowLocationHRef = "https://eaf-dev.mes.infineon.com/html/cod.html?site=MES";
|
||||||
const workItems = {
|
const workItems = {
|
||||||
a: "https://eaf-dev.mes.infineon.com/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49",
|
a: "https://eaf-dev.mes.infineon.com/markdown/bugs-features-with-parents.json?v=2025-01-22-10-49",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user