Cost of Delay

This commit is contained in:
2025-01-28 13:27:12 -07:00
parent 08a23114c9
commit 304bf04afe
45 changed files with 55913 additions and 414 deletions

View File

@ -25,12 +25,12 @@ function compareCostOfDelay(a, b) {
}
function showOne(rowData) {
if (rowData == null)
if (rowData == undefined)
return;
var data = [];
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) {
if (rowData[property] == null)
if (rowData[property] == undefined)
continue;
data.push({ name: property, value: rowData[property].toString() });
}
@ -44,7 +44,7 @@ function showOne(rowData) {
function loadOne() {
var selectedRow = $("#HeaderGrid").data("igGridSelection").selectedRow();
if (selectedRow == null)
if (selectedRow == undefined)
return;
var rowData = $("#HeaderGrid").data("igGrid").dataSource.dataView()[selectedRow.index];
showOne(rowData);
@ -59,7 +59,7 @@ function detailSelectionChangedRunInfo(evt, ui) {
function getState(state) {
var result;
if (state == null)
if (state == undefined)
result = "9-Null";
else if (state === "New")
result = `1-${state}`;
@ -80,7 +80,7 @@ function getPriority(workItemType, priority) {
var result;
if (workItemType === "Bug")
result = "0-Bug";
else if (priority == null || priority === 0)
else if (priority == undefined || priority === 0)
result = "9-Null";
else if (priority === 1)
result = `${priority}-High`;
@ -96,14 +96,14 @@ function getPriority(workItemType, priority) {
}
function updateRecordCoD(workItem) {
if (workItem !== null) {
if (workItem["Effort"] === null)
if (workItem != undefined) {
if (workItem["Effort"] == undefined)
workItem["Effort"] = 1;
if (workItem["BusinessValue"] === null)
if (workItem["BusinessValue"] == undefined)
workItem["BusinessValue"] = 99999;
if (workItem["TimeCriticality"] === null)
if (workItem["TimeCriticality"] == undefined)
workItem["TimeCriticality"] = 99999;
if (workItem["RiskReductionMinusOpportunityEnablement"] === null)
if (workItem["RiskReductionMinusOpportunityEnablement"] == undefined)
workItem["RiskReductionMinusOpportunityEnablement"] = 99999;
}
}
@ -218,7 +218,7 @@ function updateRecordOther(workItem) {
}
function updateRecordParent(parent, workItem) {
if (parent === null) {
if (parent == undefined) {
workItem["ParentId"] = 9999999;
workItem["ParentTitle"] = null;
workItem["ParentState"] = null;
@ -241,7 +241,7 @@ function getRecords(data) {
workItem = data[i].WorkItem;
if (workItem.WorkItemType !== 'Feature')
continue;
if (workItem.State !== 'New' && workItem.State !== 'Active')
if (workItem.State !== 'Active' && workItem.State !== 'New')
continue;
if (workItem.Tags != null && workItem.Tags.includes("Ignore"))
continue;
@ -265,7 +265,7 @@ function setRecords(workItems) {
for (var i = 0; i < workItems.length; i++) {
record = workItems[i];
html += "<tr><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.ParentId + '">' + record.ParentId + "</a>" +
"</td><td>" + record.Title +
"</td><td>" + record.ParentTitle +
"</td><td>" + '<a target="_blank" href="https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/' + record.Id + '">' + record.Id + "</a>" +
"</td><td>" + record.Requester +
"</td><td>" + record.Title +