From 3347101eb49b0feb1a35d78eab3c16a9ac88f414 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Mon, 14 Oct 2024 18:07:55 +0600 Subject: [PATCH] pkp/pkp-lib#4787 migration updated --- api/v1/reviewerSuggestions/index.php | 20 ------------ api/v1/submissions/index.php | 13 ++++++-- .../v3_5_0/I4787_ReviewSuggestions.php | 23 ++++++++++++++ dbscripts/xml/install.xml | 1 + schemas/context.json | 8 +++++ schemas/submission.json | 31 +++++++++++++++++++ 6 files changed, 73 insertions(+), 23 deletions(-) delete mode 100644 api/v1/reviewerSuggestions/index.php create mode 100644 classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php diff --git a/api/v1/reviewerSuggestions/index.php b/api/v1/reviewerSuggestions/index.php deleted file mode 100644 index a6b7d11bee0..00000000000 --- a/api/v1/reviewerSuggestions/index.php +++ /dev/null @@ -1,20 +0,0 @@ -= 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()); diff --git a/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php b/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php new file mode 100644 index 00000000000..6f75615af47 --- /dev/null +++ b/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php @@ -0,0 +1,23 @@ + + diff --git a/schemas/context.json b/schemas/context.json index 6fe74e135df..ab8288a176d 100644 --- a/schemas/context.json +++ b/schemas/context.json @@ -383,6 +383,14 @@ "validation": [ "nullable" ] + }, + "reviewerSuggestionsHelp": { + "type": "string", + "multilingual": true, + "validation": [ + "nullable" + ], + "defaultLocaleKey": "default.submission.step.reviewerSuggestions" } } } diff --git a/schemas/submission.json b/schemas/submission.json index 56d02dc6a11..f82291ba5e9 100644 --- a/schemas/submission.json +++ b/schemas/submission.json @@ -18,6 +18,37 @@ "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" + }, + "givenName": { + "type": "string" + }, + "email": { + "type": "string" + }, + "orcidId": { + "type": "string", + "validation": [ + "nullable" + ] + }, + "suggestionReason": { + "type": "string" + } + } + } } } }