Skip to content

Commit 9c4eaf7

Browse files
committed
Change when we treat a topic as "committed"
Sometimes the same mail thread is reused for multiple commitfest patches - first one is committed, then another is started. Previously in such cases we displayed the committed icon. Now instead we treat it as in progress.
1 parent d8df407 commit 9c4eaf7

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

app/models/topic.rb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,7 @@ def self.commitfest_summaries(topic_ids)
122122
FROM commitfest_patch_tags cpt
123123
JOIN commitfest_tags ct ON ct.id = cpt.commitfest_tag_id
124124
WHERE cpt.commitfest_patch_id = cp.id
125-
) AS tag_names,
126-
(
127-
SELECT bool_or(pcc2.status = 'Committed')
128-
FROM commitfest_patch_topics cpt2
129-
JOIN commitfest_patches cp2 ON cp2.id = cpt2.commitfest_patch_id
130-
JOIN commitfest_patch_commitfests pcc2 ON pcc2.commitfest_patch_id = cp2.id
131-
WHERE cpt2.topic_id = cptop.topic_id
132-
) AS committed_any
125+
) AS tag_names
133126
FROM commitfest_patch_topics cptop
134127
JOIN commitfest_patches cp ON cp.id = cptop.commitfest_patch_id
135128
JOIN commitfest_patch_commitfests pcc ON pcc.commitfest_patch_id = cp.id
@@ -152,7 +145,7 @@ def self.commitfest_summaries(topic_ids)
152145
committer: row["committer"].to_s.strip.presence,
153146
patch_external_id: row["patch_external_id"].to_i,
154147
tags: tags,
155-
committed: ActiveModel::Type::Boolean.new.cast(row["committed_any"])
148+
committed: row["status"].to_s == "Committed"
156149
}
157150
end
158151
end

0 commit comments

Comments
 (0)