aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2026-01-15 16:01:13 +0100
committerAleksandr Nogikh <nogikh@google.com>2026-01-15 16:07:29 +0000
commit722ac325be10a199c90c32e8045030ca81d3e496 (patch)
tree2d2c6ca32254ec6bde278aa9d6a300f16a3de6be
parent5757a3d287e4b35ca77da40c5dab0a29506261cd (diff)
dashboard: fix manuallyUpstreamed
The function returned incorrect result when the reporting stage of interest was completely skipped and never reported.
-rw-r--r--dashboard/app/app_test.go6
-rw-r--r--dashboard/app/reporting.go4
-rw-r--r--dashboard/app/reporting_test.go12
3 files changed, 22 insertions, 0 deletions
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, "")
+ }
}