From d27cd7e32e8ed290480a9f08ce0c88ac9db4f068 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Thu, 3 Oct 2024 13:31:27 +0600 Subject: [PATCH 01/10] pkp/pkp-lib#4787 WIP : Reviewer suggestions --- api/v1/reviewerSuggestions/index.php | 20 ++++++++++++++++++++ locale/en/manager.po | 9 +++++++++ schemas/context.json | 6 ++++++ 3 files changed, 35 insertions(+) create mode 100644 api/v1/reviewerSuggestions/index.php diff --git a/api/v1/reviewerSuggestions/index.php b/api/v1/reviewerSuggestions/index.php new file mode 100644 index 00000000000..a6b7d11bee0 --- /dev/null +++ b/api/v1/reviewerSuggestions/index.php @@ -0,0 +1,20 @@ + Date: Thu, 3 Oct 2024 13:31:54 +0600 Subject: [PATCH 02/10] pkp/pkp-lib#4787 Submodule Update ##touhidurabir/i4787_main## --- lib/pkp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pkp b/lib/pkp index b48b679bf1a..fc868dc6322 160000 --- a/lib/pkp +++ b/lib/pkp @@ -1 +1 @@ -Subproject commit b48b679bf1ac19112641b8d0c8599121b6efa6ae +Subproject commit fc868dc63222551c9bdda6fcf5a4168f20ad94a3 From 53c698470c4bef1559217baab2e7537af1c2f4d6 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Mon, 14 Oct 2024 18:07:55 +0600 Subject: [PATCH 03/10] 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" + } + } + } } } } From 8e3c345d16ed75b54aabf5e096bab9f4af7616e5 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Mon, 14 Oct 2024 18:08:29 +0600 Subject: [PATCH 04/10] pkp/pkp-lib#4787 Submodule Update ##touhidurabir/i4787_main## --- lib/ui-library | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui-library b/lib/ui-library index 62cddfcfdaa..6453f574c83 160000 --- a/lib/ui-library +++ b/lib/ui-library @@ -1 +1 @@ -Subproject commit 62cddfcfdaa6e47a62a7dcd7ff199ab3d9a0cc34 +Subproject commit 6453f574c835419c650e9ae32a7acfd15bc69c68 From 43f40464aafe2208a01ea8bf19574ec521fc7f3f Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Fri, 25 Oct 2024 19:13:30 +0600 Subject: [PATCH 05/10] pkp/pkp-lib#4787 submission schema update to handle reviewer suggestions --- schemas/submission.json | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/schemas/submission.json b/schemas/submission.json index f82291ba5e9..f41429442ab 100644 --- a/schemas/submission.json +++ b/schemas/submission.json @@ -30,22 +30,49 @@ "type": "integer" }, "familyName" : { - "type": "string" + "type": "string", + "multilingual": true, + "apiSummary": true }, "givenName": { - "type": "string" + "type": "string", + "multilingual": true, + "apiSummary": true + }, + "fullName": { + "type": "string", + "multilingual": true, + "apiSummary": true }, "email": { - "type": "string" + "type": "string", + "apiSummary": true }, "orcidId": { "type": "string", + "apiSummary": true, "validation": [ "nullable" ] }, "suggestionReason": { - "type": "string" + "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" + ] } } } From d324aaf09f605adcba8ae33d9fd9cb37be80eb10 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Sun, 3 Nov 2024 10:27:16 +0600 Subject: [PATCH 06/10] pkp/pkp-lib#4787 added proper doc blocks --- classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php b/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php index 6f75615af47..8882fd6548f 100644 --- a/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php +++ b/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php @@ -9,7 +9,7 @@ * * @class I4787_ReviewSuggestions.php * - * @brief Rename the review reminder settings name + * @brief Add reviewer suggestion related tables * */ From 6575ee5af8681099717ba53d736122a1e2a7f616 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Tue, 12 Nov 2024 01:07:45 +0600 Subject: [PATCH 07/10] pkp/pkp-lib#4787 upgrade migrations moved to v3_6_0 folder --- .../upgrade/{v3_5_0 => v3_6_0}/I4787_ReviewSuggestions.php | 6 +++--- dbscripts/xml/install.xml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) rename classes/migration/upgrade/{v3_5_0 => v3_6_0}/I4787_ReviewSuggestions.php (79%) diff --git a/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php b/classes/migration/upgrade/v3_6_0/I4787_ReviewSuggestions.php similarity index 79% rename from classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php rename to classes/migration/upgrade/v3_6_0/I4787_ReviewSuggestions.php index 8882fd6548f..2dcacb65fa9 100644 --- a/classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php +++ b/classes/migration/upgrade/v3_6_0/I4787_ReviewSuggestions.php @@ -1,7 +1,7 @@ - From df165869e71387c7c19e2bc164f6149f151ab209 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Thu, 21 Nov 2024 19:14:38 +0600 Subject: [PATCH 08/10] pkp/pkp-lib#4787 Backend UI locale keys update --- registry/uiLocaleKeysBackend.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/registry/uiLocaleKeysBackend.json b/registry/uiLocaleKeysBackend.json index d131305af49..cbb87c681fe 100644 --- a/registry/uiLocaleKeysBackend.json +++ b/registry/uiLocaleKeysBackend.json @@ -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", @@ -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", From 65b7df40e1daaff8c11a009b63c902989ba2aa58 Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Thu, 21 Nov 2024 19:15:03 +0600 Subject: [PATCH 09/10] pkp/pkp-lib#4787 submission schema update --- schemas/submission.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/schemas/submission.json b/schemas/submission.json index f41429442ab..09f35ae011a 100644 --- a/schemas/submission.json +++ b/schemas/submission.json @@ -73,6 +73,19 @@ "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." } } } From e8fc6e7cc31fb5ea0ab167acda72081e3b75c13c Mon Sep 17 00:00:00 2001 From: Touhidur Rahman Date: Mon, 2 Dec 2024 18:34:33 +0600 Subject: [PATCH 10/10] pkp/pkp-lib#4787 consider case when adding new reviewer who is an existing suggestion --- schemas/submission.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/schemas/submission.json b/schemas/submission.json index 09f35ae011a..0c0959ce655 100644 --- a/schemas/submission.json +++ b/schemas/submission.json @@ -86,6 +86,14 @@ "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" + ] } } }