diff --git a/classes/submission/maps/Schema.php b/classes/submission/maps/Schema.php index 12f2097c384..fba0dc73b31 100644 --- a/classes/submission/maps/Schema.php +++ b/classes/submission/maps/Schema.php @@ -15,6 +15,7 @@ use APP\core\Application; use APP\submission\Submission; +use PKP\submission\PKPSubmission; class Schema extends \PKP\submission\maps\Schema { @@ -36,6 +37,11 @@ protected function mapByProperties(array $props, Submission $submission): array ); } + if (in_array('scheduledIn', $props)) { + $output['scheduledIn'] = $submission->getData('status') == PKPSubmission::STATUS_SCHEDULED ? + $submission->getCurrentPublication()->getData('issueId') : null; + } + $locales = $this->context->getSupportedSubmissionMetadataLocales(); if (!in_array($primaryLocale = $submission->getData('locale'), $locales)) { @@ -48,4 +54,11 @@ protected function mapByProperties(array $props, Submission $submission): array return $this->withExtensions($output, $submission); } + + protected function appSpecificProps(): array + { + return [ + 'scheduledIn', + ]; + } } diff --git a/lib/pkp b/lib/pkp index f29ce267fba..4c0c5a758f8 160000 --- a/lib/pkp +++ b/lib/pkp @@ -1 +1 @@ -Subproject commit f29ce267fbacc8d9285f0454079a50fabf44b235 +Subproject commit 4c0c5a758f85347d224546e67dcd3c9f30bfde0a diff --git a/schemas/submission.json b/schemas/submission.json index 1f98d04049b..56d02dc6a11 100644 --- a/schemas/submission.json +++ b/schemas/submission.json @@ -9,6 +9,15 @@ "type": "integer", "description": "The section this submission should be assigned to. This can only be passed when creating a new submission and the data is assigned to the first publication. After the submission is created, edit the publication to change the `sectionId`.", "writeOnly": true + }, + "scheduledIn": { + "type": "integer", + "description": "The submission status is `STATUS_SCHEDULED`. It shows the issue it is scheduled in.", + "apiSummary": true, + "readOnly": true, + "validation": [ + "nullable" + ] } } }