Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkp/pkp-lib#7725 Decision constants sync up #1188

Merged
merged 2 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 2 additions & 21 deletions classes/decision/Decision.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,7 @@

class Decision extends BaseDecision
{
public const INTERNAL_REVIEW = 1;
public const ACCEPT = 2;
public const EXTERNAL_REVIEW = 3;
public const PENDING_REVISIONS = 4;
public const RESUBMIT = 5;
public const DECLINE = 6;
public const RECOMMEND_EXTERNAL_REVIEW = 15;
public const REVERT_INITIAL_DECLINE = 18;
public const SKIP_INTERNAL_REVIEW = 20;
public const ACCEPT_INTERNAL = 21;
public const PENDING_REVISIONS_INTERNAL = 22;
public const RESUBMIT_INTERNAL = 23;
public const DECLINE_INTERNAL = 24;
public const RECOMMEND_ACCEPT_INTERNAL = 25;
public const RECOMMEND_PENDING_REVISIONS_INTERNAL = 26;
public const RECOMMEND_RESUBMIT_INTERNAL = 27;
public const RECOMMEND_DECLINE_INTERNAL = 28;
public const REVERT_INTERNAL_DECLINE = 29;
public const NEW_INTERNAL_ROUND = 30;
public const CANCEL_INTERNAL_REVIEW_ROUND = 34;

}

if (!PKP_STRICT_MODE) {
Expand All @@ -55,4 +36,4 @@ class Decision extends BaseDecision
define('SUBMISSION_EDITOR_DECISION_PENDING_REVISIONS', Decision::PENDING_REVISIONS);
define('SUBMISSION_EDITOR_DECISION_RESUBMIT', Decision::RESUBMIT);
define('SUBMISSION_EDITOR_RECOMMEND_EXTERNAL_REVIEW', Decision::RECOMMEND_EXTERNAL_REVIEW);
}
}
1 change: 1 addition & 0 deletions classes/decision/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace APP\decision;

use APP\decision\Decision;
use APP\decision\types\AcceptFromInternal;
use APP\decision\types\CancelInternalReviewRound;
use APP\decision\types\DeclineInternal;
Expand Down
203 changes: 203 additions & 0 deletions classes/migration/upgrade/v3_4_0/I7725_DecisionConstantsUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
<?php

/**
* @file classes/migration/upgrade/v3_4_0/I7725_DecisionConstantsUpdate.php
*
* Copyright (c) 2014-2022 Simon Fraser University
* Copyright (c) 2000-2022 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* @class I7725_DecisionConstantsUpdate
* @brief Editorial decision constant sync up accross all application
* @see https://github.com/pkp/pkp-lib/issues/7725
*/

namespace APP\migration\upgrade\v3_4_0;

class I7725_DecisionConstantsUpdate extends \PKP\migration\upgrade\v3_4_0\I7725_DecisionConstantsUpdate
{
/**
* Get the decisions constants mappings
*
* @return array
*/
public function getDecisionMappings(): array
{
return [
// \PKP\decision\Decision::INITIAL_DECLINE
[
'stage_id' => [WORKFLOW_STAGE_ID_SUBMISSION],
'current_value' => 9,
'updated_value' => 8,
],

// \PKP\decision\Decision::RECOMMEND_ACCEPT
[
'stage_id' => [WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 11,
'updated_value' => 9,
],

// \PKP\decision\Decision::RECOMMEND_PENDING_REVISIONS
[
'stage_id' => [WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 12,
'updated_value' => 10,
],

// \PKP\decision\Decision::RECOMMEND_RESUBMIT
[
'stage_id' => [WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 13,
'updated_value' => 11,
],

// \PKP\decision\Decision::RECOMMEND_DECLINE
[
'stage_id' => [WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 14,
'updated_value' => 12,
],

// \PKP\decision\Decision::RECOMMEND_EXTERNAL_REVIEW
[
'stage_id' => [WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 15,
'updated_value' => 13,
],

// \PKP\decision\Decision::NEW_EXTERNAL_ROUND
[
'stage_id' => [WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 16,
'updated_value' => 14,
],

// \PKP\decision\Decision::REVERT_DECLINE
[
'stage_id' => [WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 17,
'updated_value' => 15,
],

// \PKP\decision\Decision::REVERT_INITIAL_DECLINE
[
'stage_id' => [WORKFLOW_STAGE_ID_SUBMISSION],
'current_value' => 18,
'updated_value' => 16,
],

// \PKP\decision\Decision::SKIP_EXTERNAL_REVIEW
[
'stage_id' => [WORKFLOW_STAGE_ID_EDITING],
'current_value' => 19,
'updated_value' => 17,
],

// \PKP\decision\Decision::SKIP_INTERNAL_REVIEW
[
'stage_id' => [WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 20,
'updated_value' => 18,
],

// \PKP\decision\Decision::ACCEPT_INTERNAL
[
'stage_id' => [WORKFLOW_STAGE_ID_EDITING],
'current_value' => 21,
'updated_value' => 19,
],

// \PKP\decision\Decision::PENDING_REVISIONS_INTERNAL
[
'stage_id' => [WORKFLOW_STAGE_ID_INTERNAL_REVIEW],
'current_value' => 22,
'updated_value' => 20
],

// \PKP\decision\Decision::RESUBMIT_INTERNAL
[
'stage_id' => [],
'current_value' => 23,
'updated_value' => 21,
],

// \PKP\decision\Decision::DECLINE_INTERNAL
[
'stage_id' => [WORKFLOW_STAGE_ID_INTERNAL_REVIEW],
'current_value' => 24,
'updated_value' => 22,
],

// \PKP\decision\Decision::RECOMMEND_ACCEPT_INTERNAL
[
'stage_id' => [WORKFLOW_STAGE_ID_INTERNAL_REVIEW],
'current_value' => 25,
'updated_value' => 23,
],

// \PKP\decision\Decision::RECOMMEND_PENDING_REVISIONS_INTERNAL
[
'stage_id' => [WORKFLOW_STAGE_ID_INTERNAL_REVIEW],
'current_value' => 26,
'updated_value' => 24,
],

// \PKP\decision\Decision::RECOMMEND_RESUBMIT_INTERNAL
[
'stage_id' => [WORKFLOW_STAGE_ID_INTERNAL_REVIEW],
'current_value' => 27,
'updated_value' => 25,
],

// \PKP\decision\Decision::RECOMMEND_DECLINE_INTERNAL
[
'stage_id' => [],
'current_value' => 28,
'updated_value' => 26,
],

// \PKP\decision\Decision::REVERT_INTERNAL_DECLINE
[
'stage_id' => [WORKFLOW_STAGE_ID_INTERNAL_REVIEW],
'current_value' => 29,
'updated_value' => 27,
],

// \PKP\decision\Decision::NEW_INTERNAL_ROUND
[
'stage_id' => [WORKFLOW_STAGE_ID_INTERNAL_REVIEW],
'current_value' => 30,
'updated_value' => 28,
],

// \PKP\decision\Decision::BACK_FROM_PRODUCTION
[
'stage_id' => [WORKFLOW_STAGE_ID_EDITING],
'current_value' => 31,
'updated_value' => 29,
],

// \PKP\decision\Decision::BACK_FROM_COPYEDITING
[
'stage_id' => [WORKFLOW_STAGE_ID_SUBMISSION, WORKFLOW_STAGE_ID_INTERNAL_REVIEW, WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 32,
'updated_value' => 30,
],

// \PKP\decision\Decision::CANCEL_REVIEW_ROUND
[
'stage_id' => [WORKFLOW_STAGE_ID_SUBMISSION, WORKFLOW_STAGE_ID_INTERNAL_REVIEW, WORKFLOW_STAGE_ID_EXTERNAL_REVIEW],
'current_value' => 33,
'updated_value' => 31,
],

// \PKP\decision\Decision::CANCEL_INTERNAL_REVIEW_ROUND
[
'stage_id' => [WORKFLOW_STAGE_ID_SUBMISSION, WORKFLOW_STAGE_ID_INTERNAL_REVIEW],
'current_value' => 34,
'updated_value' => 32,
],
];
}
}
1 change: 1 addition & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
<migration class="APP\migration\upgrade\v3_4_0\I8151_ExtendSettingValues"/>
<migration class="PKP\migration\upgrade\v3_4_0\I8151_ExtendSettingValues"/>
<migration class="PKP\migration\upgrade\v3_4_0\I7366_UpdateUserAPIKeySettings"/>
<migration class="APP\migration\upgrade\v3_4_0\I7725_DecisionConstantsUpdate"/>
<data file="dbscripts/xml/upgrade/3.4.0_preupdate_email_templates.xml" />
<code function="installEmailTemplate" key="EDITOR_DECISION_SEND_TO_INTERNAL" locales="en_US" />
<code function="installEmailTemplate" key="EDITOR_DECISION_NOTIFY_OTHER_AUTHORS" locales="en_US" />
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 176 files