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 Id
Parent Title
Id
Requester
Title
Assigned To
System(s)
State
Poll Value
Value
Up
Down
";
+ var html = "
Parent Id
Parent Title
Id
Requester
Title
Assigned To
System(s)
State
Value
Up
Down
Poll 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 += "
";
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 += "
";
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 += "
";
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 += "