Skip to content

Commit b726b83

Browse files
committed
pkp/pkp-lib#11241 Added missing decisions migration
1 parent 69b8fca commit b726b83

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<?php
2+
3+
/**
4+
* @file classes/migration/upgrade/v3_5_0/I11241_MissingDecisionConstantsUpdate.php
5+
*
6+
* Copyright (c) 2025 Simon Fraser University
7+
* Copyright (c) 2025 John Willinsky
8+
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
9+
*
10+
* @class I11241_MissingDecisionConstantsUpdate
11+
*
12+
* @brief Fixed the missing decisions data in stages
13+
*
14+
* @see https://github.com/pkp/pkp-lib/issues/11241
15+
*/
16+
17+
namespace APP\migration\upgrade\v3_5_0;
18+
19+
class I11241_MissingDecisionConstantsUpdate extends \PKP\migration\upgrade\v3_4_0\I7725_DecisionConstantsUpdate
20+
{
21+
/**
22+
* Get the decisions constants mappings
23+
*/
24+
public function getDecisionMappings(): array
25+
{
26+
return [
27+
// \PKP\decision\Decision::SKIP_EXTERNAL_REVIEW
28+
[
29+
'stage_id' => [WORKFLOW_STAGE_ID_SUBMISSION],
30+
'current_value' => 19,
31+
'updated_value' => 17,
32+
],
33+
34+
// \PKP\decision\Decision::BACK_FROM_PRODUCTION
35+
[
36+
'stage_id' => [WORKFLOW_STAGE_ID_PRODUCTION],
37+
'current_value' => 31,
38+
'updated_value' => 29,
39+
],
40+
41+
// \PKP\decision\Decision::BACK_FROM_COPYEDITING
42+
[
43+
'stage_id' => [WORKFLOW_STAGE_ID_EDITING],
44+
'current_value' => 32,
45+
'updated_value' => 30,
46+
],
47+
];
48+
}
49+
}

dbscripts/xml/upgrade.xml

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
<!-- Intentional re-run of 3.4.0 migration; see https://github.com/pkp/pkp-lib/issues/10264#issuecomment-2702413991 -->
162162
<migration class="PKP\migration\upgrade\v3_4_0\I7624_StrftimeDeprecation"/>
163163
<migration class="PKP\migration\upgrade\v3_5_0\I11238_PrepareDBForStructuredCitations"/>
164+
<migration class="APP\migration\upgrade\v3_5_0\I11241_MissingDecisionConstantsUpdate"/>
164165
<note file="docs/release-notes/README-3.5.0" />
165166
</upgrade>
166167

0 commit comments

Comments
 (0)