From 797b203f277aea7d427440cb4e200ee7a2287d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Wed, 26 Feb 2025 18:10:51 +0100 Subject: [PATCH] pkp/pkp-lib#10970 Expose submissionStageId for reviewAssignment for more accurate messaging --- classes/submission/reviewAssignment/maps/Schema.php | 3 +++ schemas/reviewAssignment.json | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/classes/submission/reviewAssignment/maps/Schema.php b/classes/submission/reviewAssignment/maps/Schema.php index cae8dfd701f..93d394f91d1 100644 --- a/classes/submission/reviewAssignment/maps/Schema.php +++ b/classes/submission/reviewAssignment/maps/Schema.php @@ -106,6 +106,9 @@ protected function mapByProperties(array $props, ReviewAssignment $item, Submiss case 'submissionLocale': $output[$prop] = $submission->getData('locale'); break; + case 'submissionStageId': + $output[$prop] = $submission->getData('stageId'); + break; case 'publicationTitle': $output[$prop] = $submission->getCurrentPublication()->getFullTitles('html'); break; diff --git a/schemas/reviewAssignment.json b/schemas/reviewAssignment.json index 916e42cce47..fcc0f90b708 100644 --- a/schemas/reviewAssignment.json +++ b/schemas/reviewAssignment.json @@ -238,6 +238,17 @@ "description": "The ID of the submission associated with the assignment", "apiSummary": true }, + "submissionStageId": { + "type": "integer", + "description": "The stage of the editorial workflow that this submission is currently in. One of the `WORKFLOW_STAGE_ID_` constants. Default is `WORKFLOW_STAGE_ID_SUBMISSION`.", + "apiSummary": true, + "default": 1, + "writeDisabledInApi": true, + "validation": [ + "min:1", + "max:5" + ] + }, "submissionLocale": { "type": "string", "description": "The locale of the submission associated with the assignment",