Skip to content

Commit

Permalink
pkp/pkp-lib#10599 Refining which editorial decisions are displayed an…
Browse files Browse the repository at this point in the history
…d when.
  • Loading branch information
jardakotesovec committed Nov 14, 2024
1 parent d344ce4 commit ebc73e4
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
12 changes: 8 additions & 4 deletions classes/submission/maps/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,13 @@ protected function getAvailableEditorialDecisions(int $stageId, Submission $subm
];

if ($submission->getData('status') === Submission::STATUS_DECLINED) {
$decisionTypes[] = new RevertInitialDecline();
// when the submission is declined, allow only reverting declined status
$decisionTypes = [new RevertInitialDecline()];
} elseif ($submission->getData('status') === Submission::STATUS_QUEUED) {
$decisionTypes[] = new InitialDecline();
$decisionTypes[] = new SendInternalReview();

}
$decisionTypes[] = new SendInternalReview();
break;
case WORKFLOW_STAGE_ID_INTERNAL_REVIEW:
$decisionTypes = [
Expand All @@ -185,7 +187,8 @@ protected function getAvailableEditorialDecisions(int $stageId, Submission $subm
}

if ($submission->getData('status') === Submission::STATUS_DECLINED) {
$decisionTypes[] = new RevertDeclineInternal();
// when the submission is declined, allow only reverting declined status
$decisionTypes = [new RevertDeclineInternal()];
} elseif ($submission->getData('status') === Submission::STATUS_QUEUED) {
$decisionTypes[] = new DeclineInternal();
}
Expand All @@ -201,7 +204,8 @@ protected function getAvailableEditorialDecisions(int $stageId, Submission $subm
$decisionTypes[] = $cancelReviewRound;
}
if ($submission->getData('status') === Submission::STATUS_DECLINED) {
$decisionTypes[] = new RevertDecline();
// when the submission is declined, allow only reverting declined status
$decisionTypes = [new RevertDecline()];
} elseif ($submission->getData('status') === Submission::STATUS_QUEUED) {
$decisionTypes[] = new Decline();
}
Expand Down
19 changes: 19 additions & 0 deletions registry/uiLocaleKeysBackend.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"about.contact.email",
"admin.jobs.failed.action.redispatch",
"admin.jobs.failed.action.redispatch.all",
"admin.version",
Expand Down Expand Up @@ -201,6 +202,7 @@
"editor.submission.decision.cancelReviewRound",
"editor.submission.decision.decline",
"editor.submission.decision.requestRevisions",
"editor.submission.decision.revertDecline",
"editor.submission.decision.sendExternalReview",
"editor.submission.decision.sendInternalReview",
"editor.submission.decision.sendToProduction",
Expand Down Expand Up @@ -258,6 +260,13 @@
"grid.user.confirmLogInAs",
"help.help",
"informationCenter.informationCenter",
"invitation.cancelInvite.actionName",
"invitation.cancelInvite.message",
"invitation.cancelInvite.title",
"invitation.header",
"invitation.inviteToRole.btn",
"invitation.management.options",
"invitation.tableHeader.name",
"issue.issue",
"list.collapseAll",
"list.expandAll",
Expand Down Expand Up @@ -323,6 +332,10 @@
"manager.mailables.editTemplate",
"manager.mailables.templates",
"manager.publication.reviewStage",
"manager.statistics.counterR5Report.settings",
"manager.statistics.counterR5Reports",
"manager.statistics.counterR5Reports.description",
"manager.statistics.counterR5Reports.usageNotPossible",
"manager.workflow",
"monograph.audience",
"navigation.backTo",
Expand Down Expand Up @@ -468,8 +481,14 @@
"submissions.declined",
"submissions.incomplete",
"todo",
"user.affiliation",
"user.authorization.accessibleWorkflowStage",
"user.email",
"user.gossip",
"userInvitation.edit.message",
"userInvitation.edit.title",
"userInvitation.roleTable.role",
"userInvitation.status.invited",
"validator.required",
"workflow.review.externalReview",
"workflow.review.internalReview"
Expand Down

0 comments on commit ebc73e4

Please sign in to comment.