From 02abcd096cbcce690366f853c8bc065d22aa205c Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Tue, 11 Apr 2023 17:56:57 +0200 Subject: dashboard: introduce DiscussionReminder type Bugs are also mentioned in mass reminders, treat it as a separate discussion type. Later we'll want to limit the number of DiscussionReminder discussions we show on a bug page, so this information will be very useful. --- dashboard/app/main.go | 2 ++ dashboard/app/reporting_email.go | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'dashboard/app') diff --git a/dashboard/app/main.go b/dashboard/app/main.go index 4e68de311..732ef8362 100644 --- a/dashboard/app/main.go +++ b/dashboard/app/main.go @@ -827,6 +827,8 @@ func makeBugSubsystemUI(c context.Context, bug *Bug, entry BugSubsystem) *uiBugS func getBugDiscussionsUI(c context.Context, bug *Bug) ([]*uiBugDiscussion, error) { // TODO: also include dup bug discussions. + // TODO: limit the number of DiscussionReminder type entries, e.g. all with + // external replies + one latest. var list []*uiBugDiscussion discussions, err := discussionsForBug(c, bug.key(c)) if err != nil { diff --git a/dashboard/app/reporting_email.go b/dashboard/app/reporting_email.go index 67c8258e8..56ea74bcb 100644 --- a/dashboard/app/reporting_email.go +++ b/dashboard/app/reporting_email.go @@ -561,6 +561,10 @@ func processDiscussionEmail(c context.Context, msg *email.Email, source dashapi. } extIDs := []string{} for _, id := range msg.BugIDs { + if isBugListHash(id) { + dType = dashapi.DiscussionReminder + continue + } _, _, err := findBugByReportingID(c, id) if err == nil { extIDs = append(extIDs, id) -- cgit mrf-deployment