File tree 1 file changed +4
-2
lines changed
classes/submission/reviewAssignment
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -453,14 +453,16 @@ public function getQueryBuilder(): Builder
453
453
// Aggregate the latest review round number for the given assignment and reviewer
454
454
->leftJoinSub (
455
455
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 ' ])
457
457
->selectRaw ('MAX(ramax.round) as latest_round ' )
458
+ ->selectRaw ('MAX(ramax.stage_id) as latest_stage ' )
458
459
->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 ' ]),
460
461
'agrmax ' ,
461
462
fn (JoinClause $ join ) => $ join ->on ('ra.submission_id ' , '= ' , 'agrmax.submission_id ' )
462
463
)
463
464
->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)
464
466
)
465
467
);
466
468
You can’t perform that action at this time.
0 commit comments