Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#4787 Reviewer suggestions #4459

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
13 changes: 10 additions & 3 deletions api/v1/submissions/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@
* @brief Handle requests for submission API functions.
*
*/

$urlParts = explode('/', trim($_SERVER['PATH_INFO'], '/'));

if (count($urlParts) >= 6 && $urlParts[5] == 'files') {
return new \PKP\handler\APIHandler(new \PKP\API\v1\submissions\PKPSubmissionFileController());
} elseif (in_array('jats', $urlParts)) {
}

if (in_array('jats', $urlParts)) {
return new \PKP\handler\APIHandler(new \PKP\API\v1\jats\PKPJatsController());
} else {
return new \PKP\handler\APIHandler(new \APP\API\v1\submissions\SubmissionController());
}

if (in_array('suggestions', $urlParts)) {
return new \PKP\handler\APIHandler(new PKP\API\v1\reviewers\suggestions\ReviewerSuggestionController());
}

return new \PKP\handler\APIHandler(new \APP\API\v1\submissions\SubmissionController());
23 changes: 23 additions & 0 deletions classes/migration/upgrade/v3_6_0/I4787_ReviewSuggestions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

/**
* @file classes/migration/upgrade/v3_6_0/I4787_ReviewSuggestions.php
*
* Copyright (c) 2024 Simon Fraser University
* Copyright (c) 2024 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class I4787_ReviewSuggestions.php
*
* @brief Add reviewer suggestion related tables
*
*/

namespace APP\migration\upgrade\v3_6_0;

class I4787_ReviewSuggestions extends \PKP\migration\upgrade\v3_6_0\I4787_ReviewSuggestions
{
protected string $CONTEXT_TABLE = 'journals';
protected string $CONTEXT_SETTINGS_TABLE = 'journal_settings';
protected string $CONTEXT_COLUMN = 'journal_id';
}
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 61 files
+64 −79 api/v1/invitations/InvitationController.php
+183 −0 api/v1/reviewers/suggestions/ReviewerSuggestionController.php
+109 −0 api/v1/reviewers/suggestions/formRequests/AddReviewerSuggestion.php
+67 −0 api/v1/reviewers/suggestions/formRequests/EditReviewerSuggestion.php
+60 −0 api/v1/reviewers/suggestions/resources/ReviewerSuggestionResource.php
+31 −1 classes/components/forms/context/PKPReviewSetupForm.php
+82 −0 classes/components/forms/submission/ReviewerSuggestionsForm.php
+32 −8 classes/components/forms/submission/SubmissionGuidanceSettings.php
+43 −0 classes/components/listPanels/PKPSelectReviewerListPanel.php
+117 −0 classes/components/listPanels/ReviewerSuggestionsListPanel.php
+46 −20 classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php
+11 −6 classes/core/PKPBaseController.php
+12 −4 classes/core/PKPContainer.php
+246 −0 classes/core/ValidationServiceProvider.php
+1 −1 classes/core/traits/ModelWithSettings.php
+6 −1 classes/invitation/core/CreateInvitationController.php
+12 −7 classes/invitation/core/Invitation.php
+5 −1 classes/invitation/core/InvitationActionRedirectController.php
+1 −1 classes/invitation/invitations/changeProfileEmail/handlers/ChangeProfileEmailInviteRedirectController.php
+1 −1 classes/invitation/invitations/registrationAccess/handlers/RegistrationAccessInviteRedirectController.php
+1 −1 classes/invitation/invitations/reviewerAccess/handlers/ReviewerAccessInviteRedirectController.php
+26 −1 classes/invitation/invitations/userRoleAssignment/UserRoleAssignmentInvite.php
+12 −4 classes/invitation/invitations/userRoleAssignment/handlers/UserRoleAssignmentInviteRedirectController.php
+54 −1 classes/invitation/invitations/userRoleAssignment/handlers/api/UserRoleAssignmentCreateController.php
+2 −1 classes/invitation/invitations/userRoleAssignment/handlers/api/UserRoleAssignmentReceiveController.php
+5 −1 classes/invitation/invitations/userRoleAssignment/payload/UserRoleAssignmentInvitePayload.php
+93 −0 classes/invitation/invitations/userRoleAssignment/resources/BaseUserRoleAssignmentInviteResource.php
+62 −0 classes/invitation/invitations/userRoleAssignment/resources/UserRoleAssignmentInviteManagerDataResource.php
+6 −53 classes/invitation/invitations/userRoleAssignment/resources/UserRoleAssignmentInviteResource.php
+113 −0 classes/migration/install/ReviewerSuggestionsMigration.php
+50 −0 classes/migration/upgrade/v3_6_0/I4787_ReviewSuggestions.php
+1 −1 classes/publication/Repository.php
+63 −0 classes/security/authorization/internal/SubmissionIncompletePolicy.php
+87 −8 classes/submission/maps/Schema.php
+269 −0 classes/submission/reviewer/suggestion/ReviewerSuggestion.php
+1 −1 classes/user/Repository.php
+109 −0 classes/validation/MultilingualInput.php
+14 −107 classes/validation/ValidatorFactory.php
+92 −0 classes/validation/traits/HasMultilingualRule.php
+73 −4 controllers/grid/users/reviewer/form/AdvancedSearchReviewerForm.php
+40 −10 controllers/grid/users/reviewer/form/CreateReviewerForm.php
+41 −4 controllers/grid/users/reviewer/form/EnrollExistingReviewerForm.php
+4 −0 controllers/grid/users/reviewer/form/ReviewerForm.php
+81 −51 js/controllers/grid/users/reviewer/AdvancedReviewerSearchHandler.js
+3 −0 locale/en/api.po
+3 −0 locale/en/common.po
+9 −0 locale/en/default.po
+3 −0 locale/en/editor.po
+11 −0 locale/en/grid.po
+3 −0 locale/en/invitation.po
+3 −0 locale/en/manager.po
+18 −0 locale/en/submission.po
+3 −0 locale/en/user.po
+4 −0 pages/dashboard/PKPDashboardHandlerNext.php
+97 −11 pages/submission/PKPSubmissionHandler.php
+12 −3 templates/controllers/grid/users/reviewer/form/advancedSearchReviewerAssignmentForm.tpl
+30 −25 templates/controllers/grid/users/reviewer/form/advancedSearchReviewerForm.tpl
+4 −0 templates/controllers/grid/users/reviewer/form/createReviewerForm.tpl
+15 −1 templates/controllers/grid/users/reviewer/form/enrollExistingReviewerForm.tpl
+71 −0 templates/submission/review-reviewer-suggestions.tpl
+8 −0 templates/submission/wizard.tpl
9 changes: 9 additions & 0 deletions locale/en/manager.po
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,15 @@ msgstr "Reviewer Ratings"
msgid "manager.setup.reviewOptions.reviewerReminders"
msgstr "Reviewer Reminders"

msgid "manager.setup.reviewOptions.reviewerSuggestionEnabled"
msgstr "Reviewer Suggestion at Submission"

msgid "manager.setup.reviewOptions.reviewerSuggestionEnabled.description"
msgstr "Author can suggest few potntial reviewers before completing the submission which can streamline the review process and provide valuable input for editorial team."

msgid "manager.setup.reviewOptions.reviewerSuggestionEnabled.label"
msgstr "Allow authors to suggest potential reviews at submission process"

msgid "manager.setup.reviewPolicy"
msgstr "Review Policy"

Expand Down
4 changes: 4 additions & 0 deletions registry/uiLocaleKeysBackend.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
"editor.submission.removeStageParticipant",
"editor.submission.removeStageParticipant.description",
"editor.submission.review.currentFiles",
"editor.submission.reviewerSuggestions",
"editor.submission.revisions",
"editor.submission.schedulePublication",
"editor.submission.search",
Expand Down Expand Up @@ -253,9 +254,12 @@
"form.saved",
"grid.action.addContributor",
"grid.action.addGalley",
"grid.action.addReviewerSuggestion",
"grid.action.delete",
"grid.action.deleteContributor",
"grid.action.deleteContributor.confirmationMessage",
"grid.action.deleteReviewerSuggestion",
"grid.action.deleteReviewerSuggestion.confirmationMessage",
"grid.action.edit",
"grid.action.editFile",
"grid.action.logInAs",
Expand Down
14 changes: 14 additions & 0 deletions schemas/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,20 @@
"type": "boolean",
"default": false,
"description": "Whether each publication version should receive a unique DOI"
},
"reviewerSuggestionEnabled": {
"type": "boolean",
"validation": [
"nullable"
]
},
"reviewerSuggestionsHelp": {
"type": "string",
"multilingual": true,
"validation": [
"nullable"
],
"defaultLocaleKey": "default.submission.step.reviewerSuggestions"
}
}
}
79 changes: 79 additions & 0 deletions schemas/submission.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,85 @@
"validation": [
"nullable"
]
},
"reviewerSuggestions": {
"type": "array",
"description": "Information about suggested reviewers at the time of submission.",
"readOnly": true,
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"familyName" : {
"type": "string",
"multilingual": true,
"apiSummary": true
},
"givenName": {
"type": "string",
"multilingual": true,
"apiSummary": true
},
"fullName": {
"type": "string",
"multilingual": true,
"apiSummary": true
},
"email": {
"type": "string",
"apiSummary": true
},
"orcidId": {
"type": "string",
"apiSummary": true,
"validation": [
"nullable"
]
},
"suggestionReason": {
"type": "string",
"multilingual": true,
"apiSummary": true
},
"affiliation" : {
"type": "string",
"multilingual": true,
"apiSummary": true
},
"approvedAt": {
"type": "string",
"apiSummary": true,
"description": "The date suggestion was approved as reviewer.",
"validation": [
"nullable",
"date:Y-m-d H:i:s"
]
},
"existingUserId": {
"type": "integer",
"apiSummary": true,
"description": "The existing user id if already present as an user.",
"validation": [
"nullable"
]
},
"existingReviewerRole": {
"type": "boolean",
"apiSummary": true,
"description": "The existing user has reviewer role when already there is an existing user association."
},
"reviewerId": {
"type": "integer",
"apiSummary": true,
"description": "The existing user id with reviewer role who as been mapped to this suggestion after the suggestion has made",
"validation": [
"nullable"
]
}
}
}
}
}
}
Loading