diff --git a/classes/submission/Collector.php b/classes/submission/Collector.php index 3bee3cf73a6..98647479bea 100644 --- a/classes/submission/Collector.php +++ b/classes/submission/Collector.php @@ -417,7 +417,13 @@ public function getQueryBuilder(): Builder ->when(is_array($this->assignedTo), function ($q) { $q->leftJoin('review_assignments AS ra', 'ra.submission_id', '=', 'p.submission_id') ->whereIn('ra.reviewer_id', $this->assignedTo) - ->whereNull('ra.reviewer_id'); + ->where(fn (Builder $q) => $q + ->whereNull('ra.reviewer_id') + ->orWhereNotIn('aus.setting_name', [ + Identity::IDENTITY_SETTING_GIVENNAME, + Identity::IDENTITY_SETTING_FAMILYNAME + ]) + ); }) ->where(DB::raw('lower(aus.setting_value)'), 'LIKE', $likePattern)->addBinding($word); });