From 722ac325be10a199c90c32e8045030ca81d3e496 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 15 Jan 2026 16:01:13 +0100 Subject: dashboard: fix manuallyUpstreamed The function returned incorrect result when the reporting stage of interest was completely skipped and never reported. --- dashboard/app/app_test.go | 6 ++++++ dashboard/app/reporting.go | 4 ++++ dashboard/app/reporting_test.go | 12 ++++++++++++ 3 files changed, 22 insertions(+) diff --git a/dashboard/app/app_test.go b/dashboard/app/app_test.go index 96861dfa5..cfabcc473 100644 --- a/dashboard/app/app_test.go +++ b/dashboard/app/app_test.go @@ -650,6 +650,12 @@ var testConfig = &GlobalConfig{ DailyLimit: 1000, Config: &TestConfig{Index: 1}, Embargo: 4 * 24 * time.Hour, + Filter: func(bug *Bug) FilterResult { + if bug.Title == "skip reporting1" { + return FilterSkip + } + return FilterReport + }, }, { Name: "reporting2", diff --git a/dashboard/app/reporting.go b/dashboard/app/reporting.go index ad55ac6c3..965cb79a4 100644 --- a/dashboard/app/reporting.go +++ b/dashboard/app/reporting.go @@ -392,6 +392,10 @@ func (bug *Bug) manuallyUpstreamed(name string) bool { if reporting == nil { return false } + if reporting.Reported.IsZero() { + // Either not reported yet, or fully skipped (if Closed is not empty). + return false + } return !reporting.Closed.IsZero() && !reporting.Auto } diff --git a/dashboard/app/reporting_test.go b/dashboard/app/reporting_test.go index 640eac30f..6f4441583 100644 --- a/dashboard/app/reporting_test.go +++ b/dashboard/app/reporting_test.go @@ -1466,4 +1466,16 @@ func TestSkipStage(t *testing.T) { client.pollNotifs(0) client.pollBugs(0) } + + { + // Don't react to skipped reporting stages. + crash := testCrash(build, 4) + crash.Title = "skip reporting1" + client.ReportCrash(crash) + rep := client.pollBug() + c.expectEQ(string(rep.Config), `{"Index":2}`) + // If we do react, there would be an upstreaming notification. + client.pollNotifs(0) + c.client.updateBug(rep.ID, dashapi.BugStatusInvalid, "") + } } -- cgit mrf-deployment