Cost of Delay
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
function compareFunction(a, b) {
|
||||
if (a.CoD === null || b.CoD === null) {
|
||||
if (a.CoD == undefined || b.CoD == undefined) {
|
||||
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;
|
||||
@ -7,12 +7,12 @@ function compareFunction(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() });
|
||||
}
|
||||
@ -26,7 +26,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);
|
||||
@ -41,7 +41,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}`;
|
||||
@ -62,7 +62,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`;
|
||||
@ -78,14 +78,14 @@ function getPriority(workItemType, priority) {
|
||||
}
|
||||
|
||||
function updateRecordCoD(workItem) {
|
||||
if (workItem !== null) {
|
||||
if (workItem.Effort === null)
|
||||
if (workItem != undefined) {
|
||||
if (workItem.Effort == undefined)
|
||||
workItem.Effort = 10123;
|
||||
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;
|
||||
workItem.CoD = workItem.RiskReductionMinusOpportunityEnablement + workItem.TimeCriticality + workItem.BusinessValue;
|
||||
}
|
||||
@ -97,7 +97,7 @@ function updateRecordOther(workItem) {
|
||||
}
|
||||
|
||||
function updateRecordParent(parent, workItem) {
|
||||
if (parent === null) {
|
||||
if (parent == undefined) {
|
||||
workItem["ParentId"] = 9999999;
|
||||
workItem["ParentTitle"] = null;
|
||||
workItem["ParentState"] = null;
|
||||
|
Reference in New Issue
Block a user