Skip to content

Commit

Permalink
pkp#8887 Fixes & clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy-1 committed Oct 24, 2023
1 parent 9c7a8d5 commit 48f9d07
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 697 deletions.
2 changes: 1 addition & 1 deletion classes/submission/reviewAssignment/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function getQueryBuilder(): Builder

$q->when($this->isLastReviewRound || $this->isIncomplete, function(Builder $q) {$q
->whereRaw('ra.round = agrr.current_round') // assignments from the last review round only
->whereRaw('ra.stage_id = agrr.stage_id') // assignments for the current review stage only (for OMP)
->whereRaw('ra.stage_id = agrr.current_stage') // assignments for the current review stage only (for OMP)
->when($this->isIncomplete, fn(Builder $q) => $q
->where(fn(Builder $q) => $q
->whereNotNull('ra.date_notified')
Expand Down
15 changes: 15 additions & 0 deletions classes/submission/reviewAssignment/DAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace PKP\submission\reviewAssignment;

use APP\facades\Repo;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\LazyCollection;
use PKP\core\EntityDAO;
Expand Down Expand Up @@ -134,6 +135,20 @@ public function getMany(Collector $query): LazyCollection
});
}

/**
* @copydoc EntityDAO::fromRow()
*/
public function fromRow(object $row): ReviewAssignment
{
$reviewAssignment = parent::fromRow($row);
$reviewAssignment->setData(
'reviewerFullName',
Repo::user()->get($reviewAssignment->getReviewerId())->getFullName()
);

return $reviewAssignment;
}

/**
* @copydoc EntityDAO::insert()
*/
Expand Down
2 changes: 0 additions & 2 deletions classes/submission/reviewAssignment/ReviewAssignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*
* @ingroup submission
*
* @see ReviewAssignmentDAO
*
* @brief Describes review assignment properties.
*/

Expand Down
Loading

0 comments on commit 48f9d07

Please sign in to comment.