Skip to content

Commit 98288db

Browse files
touhidurabirasmecher
authored andcommitted
pkp/pkp-lib#4787 migration updated
1 parent 14753e3 commit 98288db

File tree

6 files changed

+73
-23
lines changed

6 files changed

+73
-23
lines changed

api/v1/reviewerSuggestions/index.php

-20
This file was deleted.

api/v1/submissions/index.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@
1616
* @brief Handle requests for submission API functions.
1717
*
1818
*/
19+
1920
$urlParts = explode('/', trim($_SERVER['PATH_INFO'], '/'));
2021

2122
if (count($urlParts) >= 6 && $urlParts[5] == 'files') {
2223
return new \PKP\handler\APIHandler(new \PKP\API\v1\submissions\PKPSubmissionFileController());
23-
} elseif (in_array('jats', $urlParts)) {
24+
}
25+
26+
if (in_array('jats', $urlParts)) {
2427
return new \PKP\handler\APIHandler(new \PKP\API\v1\jats\PKPJatsController());
25-
} else {
26-
return new \PKP\handler\APIHandler(new \APP\API\v1\submissions\SubmissionController());
2728
}
29+
30+
if (in_array('suggestions', $urlParts)) {
31+
return new \PKP\handler\APIHandler(new PKP\API\v1\reviewers\suggestions\ReviewerSuggestionController());
32+
}
33+
34+
return new \PKP\handler\APIHandler(new \APP\API\v1\submissions\SubmissionController());
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
/**
4+
* @file classes/migration/upgrade/v3_5_0/I4787_ReviewSuggestions.php
5+
*
6+
* Copyright (c) 2024 Simon Fraser University
7+
* Copyright (c) 2024 John Willinsky
8+
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
9+
*
10+
* @class I4787_ReviewSuggestions.php
11+
*
12+
* @brief Rename the review reminder settings name
13+
*
14+
*/
15+
16+
namespace APP\migration\upgrade\v3_5_0;
17+
18+
class I4787_ReviewSuggestions extends \PKP\migration\upgrade\v3_5_0\I4787_ReviewSuggestions
19+
{
20+
protected string $CONTEXT_TABLE = 'journals';
21+
protected string $CONTEXT_SETTINGS_TABLE = 'journal_settings';
22+
protected string $CONTEXT_COLUMN = 'journal_id';
23+
}

dbscripts/xml/install.xml

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
<migration class="PKP\migration\install\SubmissionFilesMigration" />
3636
<migration class="PKP\migration\install\LibraryFilesMigration" />
3737
<migration class="PKP\migration\install\ReviewsMigration" />
38+
<migration class="PKP\migration\install\ReviewerSuggestionsMigration" />
3839
<migration class="PKP\migration\install\TemporaryFilesMigration" />
3940
<migration class="PKP\migration\install\TombstoneMigration" />
4041
<migration class="PKP\migration\install\DoiMigration" />

schemas/context.json

+8
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,14 @@
383383
"validation": [
384384
"nullable"
385385
]
386+
},
387+
"reviewerSuggestionsHelp": {
388+
"type": "string",
389+
"multilingual": true,
390+
"validation": [
391+
"nullable"
392+
],
393+
"defaultLocaleKey": "default.submission.step.reviewerSuggestions"
386394
}
387395
}
388396
}

schemas/submission.json

+31
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,37 @@
1818
"validation": [
1919
"nullable"
2020
]
21+
},
22+
"reviewerSuggestions": {
23+
"type": "array",
24+
"description": "Information about suggested reviewers at the time of submission.",
25+
"readOnly": true,
26+
"items": {
27+
"type": "object",
28+
"properties": {
29+
"id": {
30+
"type": "integer"
31+
},
32+
"familyName" : {
33+
"type": "string"
34+
},
35+
"givenName": {
36+
"type": "string"
37+
},
38+
"email": {
39+
"type": "string"
40+
},
41+
"orcidId": {
42+
"type": "string",
43+
"validation": [
44+
"nullable"
45+
]
46+
},
47+
"suggestionReason": {
48+
"type": "string"
49+
}
50+
}
51+
}
2152
}
2253
}
2354
}

0 commit comments

Comments
 (0)