diff --git a/Adaptation/FileHandlers/json/StaticSite/html/business.html b/Adaptation/FileHandlers/json/StaticSite/html/business.html index eca1633..3acf046 100644 --- a/Adaptation/FileHandlers/json/StaticSite/html/business.html +++ b/Adaptation/FileHandlers/json/StaticSite/html/business.html @@ -59,7 +59,7 @@ What is the relative value to the Customer or business? diff --git a/Adaptation/FileHandlers/json/StaticSite/html/effort.html b/Adaptation/FileHandlers/json/StaticSite/html/effort.html index 8ce4a87..dc4b726 100644 --- a/Adaptation/FileHandlers/json/StaticSite/html/effort.html +++ b/Adaptation/FileHandlers/json/StaticSite/html/effort.html @@ -55,7 +55,7 @@ diff --git a/Adaptation/FileHandlers/json/StaticSite/html/risk.html b/Adaptation/FileHandlers/json/StaticSite/html/risk.html index dff0468..08a4c1a 100644 --- a/Adaptation/FileHandlers/json/StaticSite/html/risk.html +++ b/Adaptation/FileHandlers/json/StaticSite/html/risk.html @@ -59,7 +59,7 @@ What else does this do for our business? diff --git a/Adaptation/FileHandlers/json/StaticSite/html/time.html b/Adaptation/FileHandlers/json/StaticSite/html/time.html index 9ac77a1..ad4e599 100644 --- a/Adaptation/FileHandlers/json/StaticSite/html/time.html +++ b/Adaptation/FileHandlers/json/StaticSite/html/time.html @@ -60,7 +60,7 @@ How does user/business value decay over time? diff --git a/Adaptation/FileHandlers/json/StaticSite/js/business.js b/Adaptation/FileHandlers/json/StaticSite/js/business.js index 6f8d511..fead3cd 100644 --- a/Adaptation/FileHandlers/json/StaticSite/js/business.js +++ b/Adaptation/FileHandlers/json/StaticSite/js/business.js @@ -1,7 +1,13 @@ var _apiUrl = null; function compareFunction(a, b) { - return b.PollValue.split('-')[0] - a.PollValue.split('-')[0] || a.Priority[0] - b.Priority[0] || b.ParentId - a.ParentId || a.Id - b.Id; + if (a.BusinessValue === null || b.BusinessValue === null) { + var aPollValue = a.PollValue.split('-'); + var bPollValue = b.PollValue.split('-'); + return bPollValue[0].trim() - aPollValue[0].trim() || b.State[0] - a.State[0] || bPollValue[bPollValue.length - 1].trim()[0] - aPollValue[aPollValue.length - 1].trim()[0] || b.ParentId - a.ParentId || a.Id - b.Id; + } else { + return b.BusinessValue - a.BusinessValue || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id; + } } function showOne(rowData) { @@ -151,12 +157,13 @@ function sendValue(element, page, id) { }); } -function setWorkItems(workItems, page, description) { +function setWorkItems(workItems, page, description, th) { var record; - var html = "Parent IdParent TitleIdRequesterTitleAssigned ToSystem(s)StatePoll ValueValueUpDown"; + var html = "Parent IdParent TitleIdRequesterTitleAssigned ToSystem(s)StateValueUpDownPoll Value" + th + ""; const element = document.getElementById("HeaderGrid"); for (var i = 0; i < workItems.length; i++) { record = workItems[i]; + var length = record.BusinessValue === null ? "" : record.BusinessValue.toString().length; html += "" + '' + record.ParentId + "" + "" + record.ParentTitle + "" + '' + record.Id + "" + @@ -165,15 +172,18 @@ function setWorkItems(workItems, page, description) { "" + record.AssignedTo + "" + record.Tags + "" + record.State + - "" + record.PollValue + "" + '' + - "UpDown"; + "" + + "Up" + + "Down" + + "" + record.PollValue + + "" + length + " - " + record.BusinessValue + + ""; } element.innerHTML = html.replaceAll(">null<", "> <"); } @@ -193,7 +203,7 @@ function updateSite() { } } -function initIndex(url, apiUrl, page, description, urlB) { +function initIndex(url, apiUrl, page, description, th, urlB) { _apiUrl = apiUrl; updateSite(); $.getJSON(urlB, { _: new Date().getTime() }, function (dataB) { @@ -202,7 +212,7 @@ function initIndex(url, apiUrl, page, description, urlB) { console.log(data.length); if (data.length > 0) console.log(data[0]); - setWorkItems(workItems, page, description); + setWorkItems(workItems, page, description, th); $(".up,.down").click(function () { var row = $(this).parents("tr:first"); if ($(this).is(".up")) { diff --git a/Adaptation/FileHandlers/json/StaticSite/js/effort.js b/Adaptation/FileHandlers/json/StaticSite/js/effort.js index 6f8d511..c9bf178 100644 --- a/Adaptation/FileHandlers/json/StaticSite/js/effort.js +++ b/Adaptation/FileHandlers/json/StaticSite/js/effort.js @@ -1,7 +1,13 @@ var _apiUrl = null; function compareFunction(a, b) { - return b.PollValue.split('-')[0] - a.PollValue.split('-')[0] || a.Priority[0] - b.Priority[0] || b.ParentId - a.ParentId || a.Id - b.Id; + if (a.Effort === null || b.Effort === null) { + var aPollValue = a.PollValue.split('-'); + var bPollValue = b.PollValue.split('-'); + return bPollValue[0].trim() - aPollValue[0].trim() || b.State[0] - a.State[0] || bPollValue[bPollValue.length - 1].trim()[0] - aPollValue[aPollValue.length - 1].trim()[0] || b.ParentId - a.ParentId || a.Id - b.Id; + } else { + return b.Effort - a.Effort || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id; + } } function showOne(rowData) { @@ -151,12 +157,13 @@ function sendValue(element, page, id) { }); } -function setWorkItems(workItems, page, description) { +function setWorkItems(workItems, page, description, th) { var record; - var html = "Parent IdParent TitleIdRequesterTitleAssigned ToSystem(s)StatePoll ValueValueUpDown"; + var html = "Parent IdParent TitleIdRequesterTitleAssigned ToSystem(s)StateValueUpDownPoll Value" + th + ""; const element = document.getElementById("HeaderGrid"); for (var i = 0; i < workItems.length; i++) { record = workItems[i]; + var length = record.Effort === null ? "" : record.Effort.toString().length; html += "" + '' + record.ParentId + "" + "" + record.ParentTitle + "" + '' + record.Id + "" + @@ -165,15 +172,18 @@ function setWorkItems(workItems, page, description) { "" + record.AssignedTo + "" + record.Tags + "" + record.State + - "" + record.PollValue + "" + '' + - "UpDown"; + "" + + "Up" + + "Down" + + "" + record.PollValue + + "" + length + " - " + record.Effort + + ""; } element.innerHTML = html.replaceAll(">null<", "> <"); } @@ -193,7 +203,7 @@ function updateSite() { } } -function initIndex(url, apiUrl, page, description, urlB) { +function initIndex(url, apiUrl, page, description, th, urlB) { _apiUrl = apiUrl; updateSite(); $.getJSON(urlB, { _: new Date().getTime() }, function (dataB) { @@ -202,7 +212,7 @@ function initIndex(url, apiUrl, page, description, urlB) { console.log(data.length); if (data.length > 0) console.log(data[0]); - setWorkItems(workItems, page, description); + setWorkItems(workItems, page, description, th); $(".up,.down").click(function () { var row = $(this).parents("tr:first"); if ($(this).is(".up")) { diff --git a/Adaptation/FileHandlers/json/StaticSite/js/risk.js b/Adaptation/FileHandlers/json/StaticSite/js/risk.js index 6f8d511..eadce1f 100644 --- a/Adaptation/FileHandlers/json/StaticSite/js/risk.js +++ b/Adaptation/FileHandlers/json/StaticSite/js/risk.js @@ -1,7 +1,13 @@ var _apiUrl = null; function compareFunction(a, b) { - return b.PollValue.split('-')[0] - a.PollValue.split('-')[0] || a.Priority[0] - b.Priority[0] || b.ParentId - a.ParentId || a.Id - b.Id; + if (a.RiskReductionMinusOpportunityEnablement === null || b.RiskReductionMinusOpportunityEnablement === null) { + var aPollValue = a.PollValue.split('-'); + var bPollValue = b.PollValue.split('-'); + return bPollValue[0].trim() - aPollValue[0].trim() || b.State[0] - a.State[0] || bPollValue[bPollValue.length - 1].trim()[0] - aPollValue[aPollValue.length - 1].trim()[0] || b.ParentId - a.ParentId || a.Id - b.Id; + } else { + return b.RiskReductionMinusOpportunityEnablement - a.RiskReductionMinusOpportunityEnablement || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id; + } } function showOne(rowData) { @@ -151,12 +157,13 @@ function sendValue(element, page, id) { }); } -function setWorkItems(workItems, page, description) { +function setWorkItems(workItems, page, description, th) { var record; - var html = "Parent IdParent TitleIdRequesterTitleAssigned ToSystem(s)StatePoll ValueValueUpDown"; + var html = "Parent IdParent TitleIdRequesterTitleAssigned ToSystem(s)StateValueUpDownPoll Value" + th + ""; const element = document.getElementById("HeaderGrid"); for (var i = 0; i < workItems.length; i++) { record = workItems[i]; + var length = record.RiskReductionMinusOpportunityEnablement === null ? "" : record.RiskReductionMinusOpportunityEnablement.toString().length; html += "" + '' + record.ParentId + "" + "" + record.ParentTitle + "" + '' + record.Id + "" + @@ -165,15 +172,18 @@ function setWorkItems(workItems, page, description) { "" + record.AssignedTo + "" + record.Tags + "" + record.State + - "" + record.PollValue + "" + '' + - "UpDown"; + "" + + "Up" + + "Down" + + "" + record.PollValue + + "" + length + " - " + record.RiskReductionMinusOpportunityEnablement + + ""; } element.innerHTML = html.replaceAll(">null<", "> <"); } @@ -193,7 +203,7 @@ function updateSite() { } } -function initIndex(url, apiUrl, page, description, urlB) { +function initIndex(url, apiUrl, page, description, th, urlB) { _apiUrl = apiUrl; updateSite(); $.getJSON(urlB, { _: new Date().getTime() }, function (dataB) { @@ -202,7 +212,7 @@ function initIndex(url, apiUrl, page, description, urlB) { console.log(data.length); if (data.length > 0) console.log(data[0]); - setWorkItems(workItems, page, description); + setWorkItems(workItems, page, description, th); $(".up,.down").click(function () { var row = $(this).parents("tr:first"); if ($(this).is(".up")) { diff --git a/Adaptation/FileHandlers/json/StaticSite/js/time.js b/Adaptation/FileHandlers/json/StaticSite/js/time.js index 6f8d511..294e0fa 100644 --- a/Adaptation/FileHandlers/json/StaticSite/js/time.js +++ b/Adaptation/FileHandlers/json/StaticSite/js/time.js @@ -1,7 +1,13 @@ var _apiUrl = null; function compareFunction(a, b) { - return b.PollValue.split('-')[0] - a.PollValue.split('-')[0] || a.Priority[0] - b.Priority[0] || b.ParentId - a.ParentId || a.Id - b.Id; + if (a.TimeCriticality === null || b.TimeCriticality === null) { + var aPollValue = a.PollValue.split('-'); + var bPollValue = b.PollValue.split('-'); + return bPollValue[0].trim() - aPollValue[0].trim() || b.State[0] - a.State[0] || bPollValue[bPollValue.length - 1].trim()[0] - aPollValue[aPollValue.length - 1].trim()[0] || b.ParentId - a.ParentId || a.Id - b.Id; + } else { + return b.TimeCriticality - a.TimeCriticality || b.State[0] - a.State[0] || b.ParentId - a.ParentId || a.Id - b.Id; + } } function showOne(rowData) { @@ -151,12 +157,13 @@ function sendValue(element, page, id) { }); } -function setWorkItems(workItems, page, description) { +function setWorkItems(workItems, page, description, th) { var record; - var html = "Parent IdParent TitleIdRequesterTitleAssigned ToSystem(s)StatePoll ValueValueUpDown"; + var html = "Parent IdParent TitleIdRequesterTitleAssigned ToSystem(s)StateValueUpDownPoll Value" + th + ""; const element = document.getElementById("HeaderGrid"); for (var i = 0; i < workItems.length; i++) { record = workItems[i]; + var length = record.TimeCriticality === null ? "" : record.TimeCriticality.toString().length; html += "" + '' + record.ParentId + "" + "" + record.ParentTitle + "" + '' + record.Id + "" + @@ -165,15 +172,18 @@ function setWorkItems(workItems, page, description) { "" + record.AssignedTo + "" + record.Tags + "" + record.State + - "" + record.PollValue + "" + '' + - "UpDown"; + "" + + "Up" + + "Down" + + "" + record.PollValue + + "" + length + " - " + record.TimeCriticality + + ""; } element.innerHTML = html.replaceAll(">null<", "> <"); } @@ -193,7 +203,7 @@ function updateSite() { } } -function initIndex(url, apiUrl, page, description, urlB) { +function initIndex(url, apiUrl, page, description, th, urlB) { _apiUrl = apiUrl; updateSite(); $.getJSON(urlB, { _: new Date().getTime() }, function (dataB) { @@ -202,7 +212,7 @@ function initIndex(url, apiUrl, page, description, urlB) { console.log(data.length); if (data.length > 0) console.log(data[0]); - setWorkItems(workItems, page, description); + setWorkItems(workItems, page, description, th); $(".up,.down").click(function () { var row = $(this).parents("tr:first"); if ($(this).is(".up")) {