Skip to contentSkip to conversation

dashboard/bugtriage: reformat HTML

PATCH New Ross Burton 1 participant 8 messages Sep 11

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 dashboard/bugtriage: reformat HTML

Reformat the HTML and JavaScript as it was getting a little messy.

---
 scripts/dashboard/bugtriage/index.html | 80 +++++++++++++++++---------
 1 file changed, 52 insertions(+), 28 deletions(-)
scripts/dashboard/bugtriage/index.html +52 -28
index ee4f4019..8427b0d1 100644
@@ -12,7 +12,6 @@
   <link rel="icon" type="image/png" sizes="16x16" href="../resources/favicon-16x16.png">
   <script src="vanillajs-scrollspy.min.js"></script>
   <style>
-
     body {
       font-size: 0.9rem;
     }
@@ -108,7 +107,11 @@
       animation: spinner 2s infinite linear;
     }
 
-    @keyframes spinner {to{transform: rotate(1turn)}}
+    @keyframes spinner {
+      to {
+        transform: rotate(1turn)
+      }
+    }
 
     [href="#top"] {
       cursor: pointer;
@@ -143,7 +146,7 @@
       width: 1em;
       height: 1em;
     }
-    
+
     @media (prefers-color-scheme: dark) {
       th span:after {
         color: #EEE;
@@ -155,20 +158,20 @@
       background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3C!--!Font Awesome Free v7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--%3E%3Cpath d='M160 288C147.1 288 135.4 280.2 130.4 268.2C125.4 256.2 128.2 242.5 137.4 233.4L297.4 73.4C309.9 60.9 330.2 60.9 342.7 73.4L502.7 233.4C511.9 242.6 514.6 256.3 509.6 268.3C504.6 280.3 492.9 288 480 288L160 288z'/%3E%3C/svg%3E");
       opacity: 1;
     }
-    
+
     th[aria-sort="descending"] span:after {
       content: "";
       background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 640'%3E%3C!--!Font Awesome Free v7.2.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--%3E%3Cpath d='M160 352C147.1 352 135.4 359.8 130.4 371.8C125.4 383.8 128.2 397.5 137.4 406.6L297.4 566.6C309.9 579.1 330.2 579.1 342.7 566.6L502.7 406.6C511.9 397.4 514.6 383.7 509.6 371.7C504.6 359.7 492.9 352 480 352L160 352z'/%3E%3C/svg%3E");
       opacity: 1;
     }
 
-    #nav-drawer-open, 
+    #nav-drawer-open,
     #nav-drawer-close {
       display: none;
       cursor: pointer;
       font-size: 2.5rem;
       line-height: 0.9em;
-    } 
+    }
 
     #nav-drawer-open {
       margin-inline-end: 0.75em;
@@ -180,19 +183,22 @@
       margin-top: 0.35em;
       padding-inline-end: 0.4em;
     }
-    
+
     @media (max-width: 1023px) {
       body>main {
         padding-right: 0;
       }
-      #nav-drawer-open, 
+
+      #nav-drawer-open,
       #nav-drawer-close {
         display: block;
-      } 
+      }
+
       .spread {
         display: flex;
         justify-content: space-between;
       }
+
       .sticky {
         position: sticky;
         top: 0;
@@ -204,9 +210,10 @@
         z-index: 1;
       }
 
-      body.show-nav .sidebar{
+      body.show-nav .sidebar {
         transform: translateX(0em);
       }
+
       .sidebar {
         display: block;
         position: fixed;
@@ -219,17 +226,21 @@
         overflow-y: auto;
         z-index: 2;
       }
+
       #table-of-contents {
         position: relative;
         margin-bottom: 2em;
       }
+
       section {
         margin-inline: 0;
       }
+
       .table-container {
         overflow-x: auto;
         max-width: 95vw;
       }
+
       /* make summary column fixed width on small screens */
       td:nth-child(2) {
         min-width: 30ch;
@@ -277,12 +288,14 @@
           <p>
             The meeting is held every Thursday at 07:30 Pacific Time (typically
             15:30 GMT or 16:30 CET, but be aware of daylight saving shifts). The
-            meeting is held on <a href="https://zoom.us/">Zoom</a>, join with either the <a href="https://zoom.us/j/454367603?pwd=ZGxoa2ZXL3FkM3Y0bFd5aVpHVVZ6dz09">direct
+            meeting is held on <a href="https://zoom.us/">Zoom</a>, join with either the <a
+              href="https://zoom.us/j/454367603?pwd=ZGxoa2ZXL3FkM3Y0bFd5aVpHVVZ6dz09">direct
               link</a> or use the Meeting ID <strong>454-367-603</strong> and password
             <strong>277925</strong>.
           </p>
           <p>
-            The call facilitator is Stephen Jolley &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;. The
+            The call facilitator is Stephen Jolley &lt;<a
+              href="mailto:[email protected]">[email protected]</a>&gt;. The
             facilitator's job is to ensure the agenda is kept to, without ratholing
             on any particular bug, and keeping to the time slot.
           </p>
@@ -290,18 +303,20 @@
         <section id="security-container" class="table-container">
           <h4>Security-related</h4>
           <p>
-            <a href="https://bugzilla.yoctoproject.org/buglist.cgi?list_id=604307&resolution=---&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ACCEPTED&bug_status=IN%20PROGRESS%20DESIGN&bug_status=IN%20PROGRESS%20DESIGN%20COMPLETE&bug_status=IN%20PROGRESS%20IMPLEMENTATION&bug_status=IN%20PROGRESS%20REVIEW&bug_status=REOPENED&bug_status=NEEDINFO&product=Security&product=Security%20-%20Recipe%20Upgrade" target="_blank">View security-related bugs in Bugzilla</a>.
+            <a href="https://bugzilla.yoctoproject.org/buglist.cgi?list_id=604307&resolution=---&query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ACCEPTED&bug_status=IN%20PROGRESS%20DESIGN&bug_status=IN%20PROGRESS%20DESIGN%20COMPLETE&bug_status=IN%20PROGRESS%20IMPLEMENTATION&bug_status=IN%20PROGRESS%20REVIEW&bug_status=REOPENED&bug_status=NEEDINFO&product=Security&product=Security%20-%20Recipe%20Upgrade"
+              target="_blank">View security-related bugs in Bugzilla</a>.
           </p>
           <p>
             Security issues a need to be viewed directly in Bugzilla as they are
             only visible to users with sufficient permissions.
           </p>
         </section>
-        
+
         <section id="unprioritised-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Unprioritised<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#unprioritised');">Reload Bugs</a></h4>
+              <h4>Unprioritised<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#unprioritised');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -313,7 +328,8 @@
         <section id="high-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>High<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#high');">Reload Bugs</a></h4>
+              <h4>High<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#high');">Reload
+                  Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -325,7 +341,8 @@
         <section id="reopened-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Reopened<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#reopened');">Reload Bugs</a></h4>
+              <h4>Reopened<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#reopened');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -338,7 +355,8 @@
         <section id="abint-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Autobuilder Intermittent<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#abint');">Reload Bugs</a></h4>
+              <h4>Autobuilder Intermittent<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#abint');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -352,7 +370,8 @@
         <section id="needinfo-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Need Info<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#needinfo');">Reload Bugs</a></h4>
+              <h4>Need Info<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#needinfo');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -366,7 +385,8 @@
         <section id="oldmilestone-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Wrong Milestone<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#oldmilestone');">Reload Bugs</a></h4>
+              <h4>Wrong Milestone<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#oldmilestone');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -379,7 +399,8 @@
         <section id="inactivebugs-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Inactive Bugs<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#inactivebugs');">Reload Bugs</a></h4>
+              <h4>Inactive Bugs<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#inactivebugs');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -391,7 +412,8 @@
         <section id="inactivefeatures-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Inactive Enhancements<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#inactivefeatures');">Reload Bugs</a></h4>
+              <h4>Inactive Enhancements<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#inactivefeatures');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -403,7 +425,8 @@
         <section id="newcomer-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Potential Newcomer<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#newcomer');">Reload Bugs</a></h4>
+              <h4>Potential Newcomer<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#newcomer');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -416,7 +439,8 @@
         <section id="retest-container" class="table-container">
           <span class="spread">
             <span>
-              <h4>Needs Testing<span class="bug-count"></span><a class="reload-button" onclick="reloadTable('#retest');">Reload Bugs</a></h4>
+              <h4>Needs Testing<span class="bug-count"></span><a class="reload-button"
+                  onclick="reloadTable('#retest');">Reload Bugs</a></h4>
             </span>
           </span>
           <p>
@@ -457,7 +481,7 @@
     const menu = document.querySelector('#table-of-contents')
     const scrollspy = VanillaScrollspy({ menu })
     scrollspy.init()
-    
+
   </script>
   <script>
     const serverUrl = "https://bugzilla.yoctoproject.org";
@@ -488,7 +512,7 @@
       // Appends the bug count to both the section headline and
       // the corresponding navigation item
       const container = document.querySelector(selector).closest("section")
-      const headline =  container.querySelector('.bug-count')
+      const headline = container.querySelector('.bug-count')
       headline.innerText = `(${bugCount})`
 
       const anchor = `#${container.getAttribute('id')}`
@@ -514,7 +538,7 @@
         const th = document.createElement("th")
         tr.appendChild(th).appendChild(document.createElement("span")).append(value);
         if (key === 'id') {
-            th.setAttribute('data-sort-method', 'number')
+          th.setAttribute('data-sort-method', 'number')
         }
       }
 
@@ -760,4 +784,4 @@
   </script>
 </body>
 
-</html>
+</html>
\ No newline at end of file
Signature · 1 line
2.43.0
#1 lore raw

PATCH 2/8 dashboard/bugtriage: fetch releases.json once

Assume that the releases.json doesn't change often and fetch it once whilst the page is loading instead of every time we reload the Old Milestones section.

---
 scripts/dashboard/bugtriage/index.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/dashboard/bugtriage/index.html +3 -1
index 8427b0d1..7970b5dd 100644
@@ -724,8 +724,10 @@
       return active;
     }
 
+    const activeMilestonesPromise = getActiveReleases();
+
     async function bugsOldMilestone(table) {
-      const activeMilestones = await getActiveReleases();
+      const activeMilestones = await activeMilestonesPromise;
 
       const params = new URLSearchParams({
         resolution: "---",
Signature · 1 line
2.43.0
#2 lore raw

PATCH 3/8 dashboard/bugtriage: match whiteboard on words not substrings

In reply to Ross Burton

This avoids false positives with substring matches.

---
 scripts/dashboard/bugtriage/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/dashboard/bugtriage/index.html +1 -1
index 7970b5dd..873a3b6f 100644
@@ -607,7 +607,7 @@
       const params = new URLSearchParams({
         resolution: "---",
         status_whiteboard: keyword,
-        status_whiteboard_type: "substring",
+        status_whiteboard_type: "anywords",
       });
       const bugs = await searchBugs(table, params);
     }
Signature · 1 line
2.43.0
#3 lore raw

PATCH 4/8 dashboard/bugtriage: refactor the fetch/update

In reply to Ross Burton

move the searchBugs() calls into reloadTable() so that the bugsBy*() functions just return a constructed query object.

---
 scripts/dashboard/bugtriage/index.html | 49 +++++++++++++++-----------
 1 file changed, 28 insertions(+), 21 deletions(-)
scripts/dashboard/bugtriage/index.html +28 -21
index 873a3b6f..7febd4dc 100644
@@ -603,31 +603,31 @@
       reloadButton.classList.toggle('spin')
     }
 
-    async function bugsByWhiteboard(table, keyword) {
+    function bugsByWhiteboard(keyword) {
       const params = new URLSearchParams({
         resolution: "---",
         status_whiteboard: keyword,
         status_whiteboard_type: "anywords",
       });
-      const bugs = await searchBugs(table, params);
+      return params;
     }
 
-    async function bugsByPriority(table, priority) {
+    function bugsByPriority(priority) {
       const params = new URLSearchParams({
         resolution: "---",
         priority: priority
       });
-      const bugs = await searchBugs(table, params);
+      return params;
     }
 
-    async function bugsByStatus(table, status) {
+    function bugsByStatus(status) {
       const params = new URLSearchParams({
         bug_status: status
       });
-      const bugs = await searchBugs(table, params);
+      return params;
     }
 
-    async function bugsInactive(table, operator) {
+    function bugsInactive(operator) {
       const params = new URLSearchParams({
         resolution: "---",
         f1: "days_elapsed",
@@ -637,7 +637,7 @@
         o2: operator,
         v2: "enhancement"
       });
-      const bugs = await searchBugs(table, params);
+      return params;
     }
 
     function escapeRegExp(string) {
@@ -726,7 +726,7 @@
 
     const activeMilestonesPromise = getActiveReleases();
 
-    async function bugsOldMilestone(table) {
+    async function bugsOldMilestone() {
       const activeMilestones = await activeMilestonesPromise;
 
       const params = new URLSearchParams({
@@ -735,42 +735,49 @@
         o1: "notregexp",
         v1: `^(${activeMilestones.map((s) => escapeRegExp(s)).join("|")})$`
       });
-      const bugs = await searchBugs(table, params);
+      return params;
     }
 
-    function reloadTable(table) {
+    async function reloadTable(table) {
+      let params;
+
       switch (table) {
         case "#unprioritised":
-          bugsByPriority(table, "Undecided");
+          params = bugsByPriority("Undecided");
           break;
         case "#high":
-          bugsByPriority(table, "High");
+          params = bugsByPriority("High");
           break;
         case "#abint":
-          bugsByWhiteboard(table, "AB-INT");
+          params = bugsByWhiteboard("AB-INT");
           break;
         case "#newcomer":
-          bugsByWhiteboard(table, "NEWCOMER");
+          params = bugsByWhiteboard("NEWCOMER");
           break;
         case "#retest":
-          bugsByWhiteboard(table, "RETEST");
+          params = bugsByWhiteboard("RETEST");
           break;
         case "#reopened":
-          bugsByStatus(table, "REOPENED");
+          params = bugsByStatus("REOPENED");
           break;
         case "#needinfo":
-          bugsByStatus(table, "NEEDINFO");
+          params = bugsByStatus("NEEDINFO");
           break;
         case "#inactivebugs":
-          bugsInactive(table, "notequals");
+          params = bugsInactive("notequals");
           break;
         case "#inactivefeatures":
-          bugsInactive(table, "equals");
+          params = bugsInactive("equals");
           break;
         case "#oldmilestone":
-          bugsOldMilestone(table);
+          params = await bugsOldMilestone();
           break;
+        default:
+          console.error(`Unhandled table ${table}`);
+          return;
       }
+
+      await searchBugs(table, params);
     }
 
     reloadTable("#unprioritised");
Signature · 1 line
2.43.0
#4 lore raw

PATCH 5/8 dashboard/bugtriage: add BZSearch, subclassing URLSearchParams

In reply to Ross Burton

Add a subclass of URLSearchParams that has some helper functions for constructing Bugzilla search queries.

Change all constructors that use URLSearchParams to BZSearch.

---
 scripts/dashboard/bugtriage/index.html | 43 +++++++++++++++++++++++---
 1 file changed, 38 insertions(+), 5 deletions(-)
scripts/dashboard/bugtriage/index.html +38 -5
index 7febd4dc..a9ccf2e7 100644
@@ -484,6 +484,39 @@
 
   </script>
   <script>
+    // URLSearchParams subclass to make it easier to construct Bugzilla queries
+    class BZSearch extends URLSearchParams {
+      appendNotResolved() {
+        this.append("resolution", "---");
+      }
+
+      // appendQuery: add the specified field/operator/value as fN/oN/vN parameters.
+      appendQuery(field, operator, value) {
+        const index = this.nextFieldIndex();
+        this.append(`f${index}`, field);
+        this.append(`o${index}`, operator);
+        this.append(`v${index}`, value);
+      };
+
+      // appendOperator: add a logical operator (fN/vN) pair to the search
+      appendOperator(operator) {
+        const index = this.nextFieldIndex();
+        this.append(`f${index}`, "OP");
+        this.append(`j${index}`, operator);
+      };
+
+      // nextFieldIndex: return the next field number, searching for fields of the form f<int>.
+      nextFieldIndex() {
+        let max = -1;
+        for (const [key] of this) {
+          const match = /^f(\d+)$/.exec(key);
+          if (match)
+            max = Math.max(max, Number(match[1]));
+        }
+        return max + 1;
+      };
+    }
+
     const serverUrl = "https://bugzilla.yoctoproject.org";
 
     const ignoreProducts = [
@@ -604,7 +637,7 @@
     }
 
     function bugsByWhiteboard(keyword) {
-      const params = new URLSearchParams({
+      const params = new BZSearch({
         resolution: "---",
         status_whiteboard: keyword,
         status_whiteboard_type: "anywords",
@@ -613,7 +646,7 @@
     }
 
     function bugsByPriority(priority) {
-      const params = new URLSearchParams({
+      const params = new BZSearch({
         resolution: "---",
         priority: priority
       });
@@ -621,14 +654,14 @@
     }
 
     function bugsByStatus(status) {
-      const params = new URLSearchParams({
+      const params = new BZSearch({
         bug_status: status
       });
       return params;
     }
 
     function bugsInactive(operator) {
-      const params = new URLSearchParams({
+      const params = new BZSearch({
         resolution: "---",
         f1: "days_elapsed",
         o1: "greaterthaneq",
@@ -729,7 +762,7 @@
     async function bugsOldMilestone() {
       const activeMilestones = await activeMilestonesPromise;
 
-      const params = new URLSearchParams({
+      const params = new BZSearch({
         resolution: "---",
         f1: "target_milestone",
         o1: "notregexp",
Signature · 1 line
2.43.0
#5 lore raw

PATCH 6/8 dashboard/bugtriage: move common query setup to BZSearch's constructor

In reply to Ross Burton

Use .appendQuery() for neater code.

This consolidates the query construction into a single location.

---
 scripts/dashboard/bugtriage/index.html | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)
scripts/dashboard/bugtriage/index.html +11 -12
index a9ccf2e7..939dd8fb 100644
@@ -486,6 +486,17 @@
   <script>
     // URLSearchParams subclass to make it easier to construct Bugzilla queries
     class BZSearch extends URLSearchParams {
+      constructor(...args) {
+        super(...args);
+
+        // Filter to just the fields we want
+        this.append("include_fields", Array.from(fields.keys()).join());
+
+        // Ignore specific products and components.
+        this.appendQuery("product", "notregexp", `^(${ignoreProducts.map((s) => escapeRegExp(s)).join("|")})$`);
+        this.appendQuery("component", "notregexp", `^(${ignoreComponents.map((s) => escapeRegExp(s)).join("|")})$`);
+      }
+
       appendNotResolved() {
         this.append("resolution", "---");
       }
@@ -604,18 +615,6 @@
       const reloadButton = container.querySelector('.reload-button')
       reloadButton.classList.toggle('spin')
 
-      params.append("include_fields", Array.from(fields.keys()).join());
-
-      // Ignore specific products and components. The field numbers are high so
-      // that caller's queries can use fields without conflicts.
-      params.append("f100", "product",)
-      params.append("o100", "notregexp",)
-      params.append("v100", `^(${ignoreProducts.map((s) => escapeRegExp(s)).join("|")})$`)
-
-      params.append("f101", "component",)
-      params.append("o101", "notregexp",)
-      params.append("v101", `^(${ignoreComponents.map((s) => escapeRegExp(s)).join("|")})$`)
-
       var bzlink = document.createElement("a");
       var buglistURL = `${serverUrl}/buglist.cgi?${params}`;
       bzlink.setAttribute("href", buglistURL);
Signature · 1 line
2.43.0
#6 lore raw

PATCH 7/8 dashboard/bugtriage: rewrite queries using BZSearch functions

In reply to Ross Burton

Use the new BZSearch functions to construct the queries. No change to the actual queries, just the code.

---
 scripts/dashboard/bugtriage/index.html | 43 ++++++++++----------------
 1 file changed, 16 insertions(+), 27 deletions(-)
scripts/dashboard/bugtriage/index.html +16 -27
index 939dd8fb..c34fcaf3 100644
@@ -636,39 +636,31 @@
     }
 
     function bugsByWhiteboard(keyword) {
-      const params = new BZSearch({
-        resolution: "---",
-        status_whiteboard: keyword,
-        status_whiteboard_type: "anywords",
-      });
+      const params = new BZSearch();
+      params.append("status_whiteboard", keyword);
+      params.append("status_whiteboard_type", "anywords");
+      params.appendNotResolved();
       return params;
     }
 
     function bugsByPriority(priority) {
-      const params = new BZSearch({
-        resolution: "---",
-        priority: priority
-      });
+      const params = new BZSearch();
+      params.appendNotResolved();
+      params.append("priority", priority);
       return params;
     }
 
     function bugsByStatus(status) {
-      const params = new BZSearch({
-        bug_status: status
-      });
+      const params = new BZSearch();
+      params.append("bug_status", status);
       return params;
     }
 
     function bugsInactive(operator) {
-      const params = new BZSearch({
-        resolution: "---",
-        f1: "days_elapsed",
-        o1: "greaterthaneq",
-        v1: 365 * 2,
-        f2: "bug_severity",
-        o2: operator,
-        v2: "enhancement"
-      });
+      const params = new BZSearch();
+      params.appendNotResolved();
+      params.appendQuery("days_elapsed", "greaterthaneq", 365 * 2);
+      params.appendQuery("bug_severity", operator, "enhancement");
       return params;
     }
 
@@ -761,12 +753,9 @@
     async function bugsOldMilestone() {
       const activeMilestones = await activeMilestonesPromise;
 
-      const params = new BZSearch({
-        resolution: "---",
-        f1: "target_milestone",
-        o1: "notregexp",
-        v1: `^(${activeMilestones.map((s) => escapeRegExp(s)).join("|")})$`
-      });
+      const params = new BZSearch();
+      params.appendNotResolved();
+      params.appendQuery("target_milestone", "notregexp", `^(${activeMilestones.map((s) => escapeRegExp(s)).join("|")})$`);
       return params;
     }
 
Signature · 1 line
2.43.0
#7 lore raw

PATCH 8/8 dashboard/bugtriage: change Newcomer to show also bugs assigned to newcomer@

In reply to Ross Burton

The current Newcomer section shows bugs that have been tagged with the NEWCOMER whiteboard status. However there are also occasionally bugs that are assigned to newcomer@ without that whiteboard status.

Construct a query using OR operators to match either bugs that have the whiteboard status, or are assigned. The OR operator is needed like, where it effectively creates a group around assigned_to and status_whiteboard, as otherwise all of the filters are considered to be OR instead AND resulting in thousands of matches.

---
 scripts/dashboard/bugtriage/index.html | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/dashboard/bugtriage/index.html +5 -1
index c34fcaf3..73fb1317 100644
@@ -773,7 +773,11 @@
           params = bugsByWhiteboard("AB-INT");
           break;
         case "#newcomer":
-          params = bugsByWhiteboard("NEWCOMER");
+          params = new BZSearch();
+          params.appendNotResolved();
+          params.appendOperator("OR");
+          params.appendQuery("status_whiteboard", "allwords", "NEWCOMER");
+          params.appendQuery("assigned_to", "equals", "[email protected]");
           break;
         case "#retest":
           params = bugsByWhiteboard("RETEST");
Signature · 1 line
2.43.0