Skip to content

Commit

Permalink
Merge pull request #10081 from bozana/10080
Browse files Browse the repository at this point in the history
#10080 Consider only external reviewers for display on Editorial Masthead page
  • Loading branch information
bozana authored Jul 12, 2024
2 parents ac0e09e + d86c239 commit f118743
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct($action, $locales, $context)

$this->addField(new FieldOptions('mastheadUserGroupIds', [
'label' => __('common.editorialMasthead'),
'description' => __('manager.setup.editorialMasthead.description'),
'description' => __('manager.setup.editorialMasthead.order.description'),
'isOrderable' => true,
'value' => array_column($mastheadOptions, 'value'),
'options' => $mastheadOptions,
Expand Down
2 changes: 1 addition & 1 deletion classes/components/forms/context/PKPMastheadForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function __construct($action, $locales, $context, $imageUploadUrl)
])
->addField(new FieldRichTextarea('editorialHistory', [
'label' => __('common.editorialHistory'),
'description' => __('manager.setup.editorialMasthead.description'),
'description' => __('manager.setup.editorialMasthead.editorialHistory.description'),
'isMultilingual' => true,
'groupId' => 'editorialMasthead',
'toolbar' => 'bold italic superscript subscript | link | blockquote bullist numlist | image | code',
Expand Down
5 changes: 3 additions & 2 deletions classes/submission/reviewAssignment/DAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ public function delete(ReviewAssignment $reviewAssignment)
}

/**
* Get IDs of the reviewers that have completed a reivew for the given context in the given year.
* Get IDs of the external reviewers that have completed a reivew for the given context in the given year.
*
* @return Collection<int,int>
*/
public function getReviewerIdsByCompletedYear(int $contextId, string $year): Collection
public function getExternalReviewerIdsByCompletedYear(int $contextId, string $year): Collection
{
return DB::table($this->table)
->whereIn(
Expand All @@ -195,6 +195,7 @@ public function getReviewerIdsByCompletedYear(int $contextId, string $year): Col
->where('s.context_id', $contextId)
)
->whereYear('date_completed', $year)
->where('stage_id', '=', WORKFLOW_STAGE_ID_EXTERNAL_REVIEW)
->pluck('reviewer_id');
}
}
6 changes: 3 additions & 3 deletions classes/submission/reviewAssignment/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ protected function updateReviewRoundStatus(ReviewAssignment $reviewAssignment):
}

/**
* @copydoc DAO::getReviewerIdsByCompletedYear()
* @copydoc DAO::getExternalReviewerIdsByCompletedYear()
*
* @return Collection<int,int>
*/
public function getReviewerIdsByCompletedYear(int $contextId, string $year): Collection
public function getExternalReviewerIdsByCompletedYear(int $contextId, string $year): Collection
{
return $this->dao->getReviewerIdsByCompletedYear($contextId, $year);
return $this->dao->getExternalReviewerIdsByCompletedYear($contextId, $year);
}
}
6 changes: 6 additions & 0 deletions locale/en/manager.po
Original file line number Diff line number Diff line change
Expand Up @@ -3555,8 +3555,14 @@ msgstr "Require submitting Authors to file a Competing Interest (CI) statement w
msgid "manager.setup.masthead"
msgstr "Masthead"

msgid "manager.setup.editorialMasthead.order.description"
msgstr "Define the order of masthead roles for public display."

msgid "manager.setup.editorialMasthead.order.reviewers.description"
msgstr "Reviewers will be displayed in a standardized format to maintain uniformity and ensure easy discoverability in this section."

msgid "manager.setup.editorialMasthead.editorialHistory.description"
msgstr "Please provide the editorial history, including the full name, affiliation, and start and end dates of each editor."

msgid "mailable.changeProfileEmailInvitationNotify.name"
msgstr "Change Email Address Invitation"
2 changes: 1 addition & 1 deletion pages/about/AboutContextHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function editorialMasthead($args, $request)
}

$previousYear = date('Y') - 1;
$reviewerIds = Repo::reviewAssignment()->getReviewerIdsByCompletedYear($context->getId(), $previousYear);
$reviewerIds = Repo::reviewAssignment()->getExternalReviewerIdsByCompletedYear($context->getId(), $previousYear);
$usersCollector = Repo::user()->getCollector();
$reviewers = $usersCollector
->filterByUserIds($reviewerIds->toArray())
Expand Down

0 comments on commit f118743

Please sign in to comment.