diff --git a/classes/submission/maps/Schema.php b/classes/submission/maps/Schema.php index e7712af5754..a824921e92b 100644 --- a/classes/submission/maps/Schema.php +++ b/classes/submission/maps/Schema.php @@ -419,7 +419,6 @@ protected function getPropertyReviewAssignments(Enumerable $reviewAssignments): $reviews[] = [ 'id' => (int) $reviewAssignment->getId(), 'isCurrentUserAssigned' => $currentUser->getId() == (int) $reviewAssignment->getReviewerId(), - 'dateAssigned' => $reviewAssignment->getData('dateAssigned'), 'statusId' => (int) $reviewAssignment->getStatus(), 'status' => __($reviewAssignment->getStatusKey()), 'dateDue' => $dateDue, @@ -648,14 +647,14 @@ protected function getUserGroup(int $userGroupId): ?UserGroup * * @param Enumerable $submissions * - * @return LazyCollection The collection of stage assignments associated with submissions + * @return Collection The collection of stage assignments associated with submissions */ - protected function getStageAssignmentsBySubmissions(Enumerable $submissions, array $roleIds = []): LazyCollection + protected function getStageAssignmentsBySubmissions(Enumerable $submissions, array $roleIds = []): Collection { $submissionIds = $submissions->map(fn (Submission $submission) => $submission->getId())->toArray(); - - $stageAssignmentDao = DAORegistry::getDAO('StageAssignmentDAO'); /** @var StageAssignmentDAO $stageAssignmentDao */ - return $stageAssignmentDao->getCurrentBySubmissionIds($submissionIds, $roleIds)->remember(); + return StageAssignment::withSubmissionIds([$submissionIds]) + ->withRoleIds($roleIds) + ->get(); } /**