@@ -442,7 +442,7 @@ def patchlist(request, cf, personalized=False):
442442 )
443443 THEN 'Patches that are ready for your review'
444444 ELSE 'Blocked on others'
445- END AS topic ,
445+ END AS group_name ,
446446 cf.id AS cf_id,
447447 cf.name AS cf_name,
448448 cf.status AS cf_status,
@@ -465,7 +465,7 @@ def patchlist(request, cf, personalized=False):
465465 joins_str = "INNER JOIN commitfest_commitfest cf ON poc.commitfest_id=cf.id"
466466 groupby_str = "cf.id,"
467467 else :
468- columns_str = "t.topic as topic, "
468+ columns_str = ""
469469 joins_str = ""
470470 groupby_str = ""
471471
@@ -507,7 +507,7 @@ def patchlist(request, cf, personalized=False):
507507 orderby_str = "poc.commitfest_id DESC, lastmail"
508508 else :
509509 if personalized :
510- # First we sort by topic , to have the grouping work.
510+ # First we sort by group_name , to have the grouping work.
511511 # Then we show non-failing patches first, and the ones that are
512512 # shortest failing we show first. We consider patches in a closed
513513 # commitfest, as if they are failing since that commitfest was
@@ -516,7 +516,7 @@ def patchlist(request, cf, personalized=False):
516516 # progress" commitfest before ones in the "Open" commitfest.
517517 # And then to break ties, we put ones with the most recent email at
518518 # the top.
519- orderby_str = """topic DESC,
519+ orderby_str = """group_name DESC,
520520 COALESCE(
521521 branch.failing_since,
522522 CASE WHEN cf.status = %(cf_closed_status)s
@@ -526,7 +526,7 @@ def patchlist(request, cf, personalized=False):
526526 lastmail DESC"""
527527 whereparams ["cf_closed_status" ] = CommitFest .STATUS_CLOSED
528528 else :
529- orderby_str = "topic, created"
529+ orderby_str = "created"
530530 sortkey = 0
531531
532532 if not has_filter and sortkey == 0 and request .GET :
@@ -584,13 +584,12 @@ def patchlist(request, cf, personalized=False):
584584)
585585FROM commitfest_patch p
586586INNER JOIN commitfest_patchoncommitfest poc ON poc.patch_id=p.id
587- INNER JOIN commitfest_topic t ON t.id=p.topic_id
588587{ joins_str }
589588LEFT JOIN auth_user committer ON committer.id=p.committer_id
590589LEFT JOIN commitfest_targetversion v ON p.targetversion_id=v.id
591590LEFT JOIN commitfest_cfbotbranch branch ON branch.patch_id=p.id
592591WHERE { where_str }
593- GROUP BY p.id, poc.id, { groupby_str } committer.id, t.id, v.version, branch.patch_id
592+ GROUP BY p.id, poc.id, { groupby_str } committer.id, v.version, branch.patch_id
594593ORDER BY is_open DESC, { orderby_str } """ ,
595594 params ,
596595 )
@@ -648,7 +647,6 @@ def commitfest(request, cfid):
648647 "all_tags" : {t .id : t for t in Tag .objects .all ()},
649648 "has_filter" : patch_list .has_filter ,
650649 "title" : f"{ cf .title } ({ cf .periodstring } )" ,
651- "grouping" : patch_list .sortkey == 0 ,
652650 "sortkey" : patch_list .sortkey ,
653651 "openpatchids" : [p ["id" ] for p in patch_list .patches if p ["is_open" ]],
654652 "header_activity" : "Activity log" ,
0 commit comments