Skip to content

Commit 99e6085

Browse files
committed
#11252 Show review assignments only from the latest review stage (OMP)
1 parent ef4fe4e commit 99e6085

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

classes/submission/reviewAssignment/Collector.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -453,14 +453,16 @@ public function getQueryBuilder(): Builder
453453
// Aggregate the latest review round number for the given assignment and reviewer
454454
->leftJoinSub(
455455
DB::table('review_assignments as ramax')
456-
->select(['ramax.submission_id', 'ramax.reviewer_id', 'ramax.stage_id'])
456+
->select(['ramax.submission_id', 'ramax.reviewer_id'])
457457
->selectRaw('MAX(ramax.round) as latest_round')
458+
->selectRaw('MAX(ramax.stage_id) as latest_stage')
458459
->whereIn('ramax.reviewer_id', $this->reviewerIds)
459-
->groupBy(['ramax.submission_id', 'ramax.reviewer_id', 'ramax.stage_id']),
460+
->groupBy(['ramax.submission_id', 'ramax.reviewer_id']),
460461
'agrmax',
461462
fn (JoinClause $join) => $join->on('ra.submission_id', '=', 'agrmax.submission_id')
462463
)
463464
->whereColumn('ra.round', 'agrmax.latest_round') // assignments from the last review round per reviewer only
465+
->whereColumn('ra.stage_id', 'agrmax.latest_stage') // assignments for the current review stage only (for OMP)
464466
)
465467
);
466468

0 commit comments

Comments
 (0)