Skip to content

Commit

Permalink
pkp/pkp-lib#4787 migration updated
Browse files Browse the repository at this point in the history
  • Loading branch information
touhidurabir committed Oct 18, 2024
1 parent cbd6e7a commit 3347101
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 23 deletions.
20 changes: 0 additions & 20 deletions api/v1/reviewerSuggestions/index.php

This file was deleted.

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_5_0/I4787_ReviewSuggestions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

/**
* @file classes/migration/upgrade/v3_5_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 Rename the review reminder settings name
*
*/

namespace APP\migration\upgrade\v3_5_0;

class I4787_ReviewSuggestions extends \PKP\migration\upgrade\v3_5_0\I4787_ReviewSuggestions
{
protected string $CONTEXT_TABLE = 'journals';
protected string $CONTEXT_SETTINGS_TABLE = 'journal_settings';
protected string $CONTEXT_COLUMN = 'journal_id';
}
1 change: 1 addition & 0 deletions dbscripts/xml/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<migration class="PKP\migration\install\TombstoneMigration" />
<migration class="PKP\migration\install\DoiMigration" />
<migration class="PKP\migration\install\InstitutionsMigration" />
<migration class="PKP\migration\install\ReviewerSuggestionsMigration" />

<migration class="APP\migration\install\OJSMigration" />

Expand Down
8 changes: 8 additions & 0 deletions schemas/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,14 @@
"validation": [
"nullable"
]
},
"reviewerSuggestionsHelp": {
"type": "string",
"multilingual": true,
"validation": [
"nullable"
],
"defaultLocaleKey": "default.submission.step.reviewerSuggestions"
}
}
}
31 changes: 31 additions & 0 deletions schemas/submission.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
}
}

0 comments on commit 3347101

Please sign in to comment.