community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864387 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/generators.js wizard.js
Date Sun, 04 Aug 2019 14:43:09 GMT
Author: humbedooh
Date: Sun Aug  4 14:43:09 2019
New Revision: 1864387

URL: http://svn.apache.org/viewvc?rev=1864387&view=rev
Log:
Adjust to use kibble data for JIRA activity

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js?rev=1864387&r1=1864386&r2=1864387&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js Sun Aug  4 14:43:09
2019
@@ -222,8 +222,23 @@ function health_tips(data) {
     if (bz[0] || bz[1]) txt += "<li>%u BugZilla tickets opened and %u closed in the
past quarter.</li>".format(bz[0], bz[1]);
     
     // JIRA changes
-    let jira = data.jira[project];
-    if (jira[0] || jira[1]) txt += "<li>%u JIRA tickets opened and %u closed in the
past quarter.</li>".format(jira[0], jira[1]);
+    if (data.kibble) {
+      let color = 'black';
+      let ctxt = data.kibble.jira.change.opened;
+      let pct = parseInt(ctxt);
+      if (pct > 0) {
+        if (pct > 10) color = 'green';
+        ctxt += ' increase';
+      } else if (pct < 0) {
+        if (pct < -10) color = 'maroon';
+        ctxt += ' decrease';
+      } else {
+        ctxt = 'no change';
+      }
+      let s = data.kibble.jira.after.opened == 1 ? '' : 's';
+      txt += "<li style='color: %s;'>%u issue%s opened in JIRA, past quarter (%s)</li>".format(color,
data.kibble.jira.after.opened, s, ctxt);
+    }
+    
     
     // Commits and contributors
     if (data.kibble) {

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1864387&r1=1864386&r2=1864387&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Sun Aug  4 14:43:09 2019
@@ -1401,8 +1401,23 @@ function health_tips(data) {
     if (bz[0] || bz[1]) txt += "<li>%u BugZilla tickets opened and %u closed in the
past quarter.</li>".format(bz[0], bz[1]);
     
     // JIRA changes
-    let jira = data.jira[project];
-    if (jira[0] || jira[1]) txt += "<li>%u JIRA tickets opened and %u closed in the
past quarter.</li>".format(jira[0], jira[1]);
+    if (data.kibble) {
+      let color = 'black';
+      let ctxt = data.kibble.jira.change.opened;
+      let pct = parseInt(ctxt);
+      if (pct > 0) {
+        if (pct > 10) color = 'green';
+        ctxt += ' increase';
+      } else if (pct < 0) {
+        if (pct < -10) color = 'maroon';
+        ctxt += ' decrease';
+      } else {
+        ctxt = 'no change';
+      }
+      let s = data.kibble.jira.after.opened == 1 ? '' : 's';
+      txt += "<li style='color: %s;'>%u issue%s opened in JIRA, past quarter (%s)</li>".format(color,
data.kibble.jira.after.opened, s, ctxt);
+    }
+    
     
     // Commits and contributors
     if (data.kibble) {



Mime
View raw message