From c8985bd34ba727f8432bc3ec69660508d4213fd4 Mon Sep 17 00:00:00 2001 From: Howard Enos Date: Sat, 18 Jul 2026 11:16:17 -0700 Subject: [PATCH] sync: auto-sync from HOWARD-HOME at 2026-07-18 11:15:48 Author: Howard Enos Machine: HOWARD-HOME Timestamp: 2026-07-18 11:15:48 --- projects/msp-tools/bug-tracker/dashboard.html | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/projects/msp-tools/bug-tracker/dashboard.html b/projects/msp-tools/bug-tracker/dashboard.html index 7ece16a7..955f18e9 100644 --- a/projects/msp-tools/bug-tracker/dashboard.html +++ b/projects/msp-tools/bug-tracker/dashboard.html @@ -570,7 +570,19 @@ async function showDetail(repo, num) { Updated ${new Date(issue.updated_at).toLocaleString()} · Open in Gitea -
+
+ + ${issue.state==='open' ? ` @@ -613,6 +625,35 @@ async function toggleLabel(repo,num,name) { showDetail(repo,num); loadIssues(); } +async function changePriority(repo, num, newPrio) { + const lc = labelCache[repo] || {}; + const prioLabels = ['P1-critical','P2-high','P3-normal','P4-low']; + // Remove all existing priority labels + for (const p of prioLabels) { + const id = lc[p]; + if (id) await fetch(`${API}/repos/${OWNER}/${repo}/issues/${num}/labels/${id}`, {method:'DELETE', headers:headers()}); + } + // Add new one + const newId = lc[newPrio]; + if (newId) await fetch(`${API}/repos/${OWNER}/${repo}/issues/${num}/labels`, {method:'POST', headers:{...headers(),'Content-Type':'application/json'}, body:JSON.stringify({labels:[newId]})}); + showDetail(repo, num); loadIssues(); +} + +async function changeAssignee(repo, num, newAssign) { + const lc = labelCache[repo] || {}; + // Remove existing assigned: labels + for (const a of ['assigned:howard','assigned:mike']) { + const id = lc[a]; + if (id) await fetch(`${API}/repos/${OWNER}/${repo}/issues/${num}/labels/${id}`, {method:'DELETE', headers:headers()}); + } + // Add new one (if not empty) + if (newAssign) { + const newId = lc[newAssign]; + if (newId) await fetch(`${API}/repos/${OWNER}/${repo}/issues/${num}/labels`, {method:'POST', headers:{...headers(),'Content-Type':'application/json'}, body:JSON.stringify({labels:[newId]})}); + } + showDetail(repo, num); loadIssues(); +} + // --- New issue --- function showNewIssue() { const m = document.getElementById('new-modal');