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 18, 2024
1 parent ae435d2 commit d6f9096
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 19 deletions.
15 changes: 12 additions & 3 deletions classes/submission/maps/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
use PKP\decision\types\CancelReviewRound;
use PKP\decision\types\Decline;
use PKP\decision\types\InitialDecline;
use PKP\decision\types\NewExternalReviewRound;
use PKP\decision\types\RequestRevisions;
use PKP\decision\types\Resubmit;
use PKP\decision\types\RevertDecline;
use PKP\decision\types\RevertInitialDecline;
use PKP\decision\types\SendExternalReview;
Expand Down Expand Up @@ -116,15 +118,18 @@ protected function getAvailableEditorialDecisions(int $stageId, Submission $subm
new SkipExternalReview(),
];
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();
}
break;
case WORKFLOW_STAGE_ID_EXTERNAL_REVIEW:
$decisionTypes = [
new RequestRevisions(),
new Resubmit(),
new Accept(),
new NewExternalReviewRound()
];
$cancelReviewRound = new CancelReviewRound();
$reviewRoundDao = DAORegistry::getDAO('ReviewRoundDAO'); /** @var ReviewRoundDAO $reviewRoundDao */
Expand All @@ -134,7 +139,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 All @@ -146,7 +152,10 @@ protected function getAvailableEditorialDecisions(int $stageId, Submission $subm
];
break;
case WORKFLOW_STAGE_ID_PRODUCTION:
$decisionTypes[] = new BackFromProduction();
if($submission->getData('status') !== Submission::STATUS_PUBLISHED) {
$decisionTypes[] = new BackFromProduction();
}

break;
}
}
Expand Down
52 changes: 36 additions & 16 deletions registry/uiLocaleKeysBackend.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
[
"about.contact.email",
"acceptInvitation.authorization.message",
"acceptInvitation.authorization.shouldBeAnonymous",
"acceptInvitation.cancel.message",
"acceptInvitation.cancelInvite.button",
"acceptInvitation.cancelInvite.title",
"acceptInvitation.modal.button",
"acceptInvitation.modal.message",
"acceptInvitation.modal.title",
"acceptInvitation.passwordField.description",
"acceptInvitation.privacyStatement.btn",
"acceptInvitation.privacyStatement.label",
"acceptInvitation.privacyStatement.validation",
"acceptInvitation.review.accountDetails",
"acceptInvitation.review.userDetails",
"acceptInvitation.skipVerifyOrcid",
Expand All @@ -20,7 +27,6 @@
"common.addCCBCC",
"common.assign",
"common.attachFiles",
"common.attachedFiles",
"common.back",
"common.cancel",
"common.clearSearch",
Expand Down Expand Up @@ -73,7 +79,6 @@
"common.pagination.previous",
"common.payments",
"common.preview",
"common.publication",
"common.publications",
"common.remove",
"common.removeItem",
Expand Down Expand Up @@ -219,14 +224,15 @@
"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",
"editor.submission.decision.skipReview",
"editor.submission.editStageParticipant",
"editor.submission.recommend.accept",
"editor.submission.recommend.decline",
"editor.submission.recommend.revisions",
"editor.submission.recommend.sendExternalReview",
"editor.submission.recommendation",
"editor.submission.recommendation.noDecidingEditors",
"editor.submission.removeStageParticipant",
Expand Down Expand Up @@ -272,20 +278,30 @@
"grid.action.order",
"grid.action.saveOrdering",
"grid.action.sort",
"grid.catalogEntry.publicationDates",
"grid.catalogEntry.representatives",
"grid.columns.actions",
"grid.libraryFiles.submission.title",
"grid.noItems",
"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.masthead.hidden",
"invitation.masthead.show",
"invitation.orcid.acceptInvitation.message",
"invitation.removeRoles",
"invitation.role.addRole.button",
"invitation.role.dateStart",
"invitation.role.masthead",
"invitation.role.removeRole.button",
"invitation.role.selectRole",
"invitation.searchForm.emptyError",
"invitation.step",
"invitation.tableHeader.name",
"invitation.wizard.completeSteps",
"invitation.wizard.errors",
"issue.issue",
Expand Down Expand Up @@ -352,8 +368,12 @@
"manager.mailables.editTemplate",
"manager.mailables.templates",
"manager.publication.reviewStage",
"manager.roles",
"manager.statistics.counterR5Report.settings",
"manager.statistics.counterR5Reports",
"manager.statistics.counterR5Reports.description",
"manager.statistics.counterR5Reports.usageNotPossible",
"manager.workflow",
"monograph.audience",
"navigation.backTo",
"notification.type.roundStatusTitle",
"orcid.field.authorEmailModal.message",
Expand All @@ -364,7 +384,6 @@
"orcid.field.verification.request",
"orcid.field.verification.requested",
"orcid.field.verification.resendRequest",
"publication.catalogEntry",
"publication.contributors",
"publication.createVersion",
"publication.editDisabled",
Expand Down Expand Up @@ -425,7 +444,6 @@
"reviewer.submission.submittedOn",
"search.searchResults",
"semicolon",
"settings.libraryFiles.category.marketing",
"stageParticipants.notify.message",
"stats.context.downloadReport.description",
"stats.context.downloadReport.downloadContext",
Expand All @@ -448,7 +466,6 @@
"stats.timeline",
"stats.timeline.downloadReport.downloadTimeline",
"submission.changeFile",
"submission.chapters",
"submission.citations",
"submission.contributors",
"submission.files",
Expand Down Expand Up @@ -478,9 +495,7 @@
"submission.list.reviewerWorkflowLink",
"submission.list.reviewsCompleted",
"submission.list.revisionsSubmitted",
"submission.metadata",
"submission.publication",
"submission.publicationFormats",
"submission.recommendation",
"submission.review",
"submission.stageParticipants.notify",
Expand All @@ -490,20 +505,24 @@
"submission.upload.productionReady",
"submission.upload.proof",
"submission.wizard.changeSubmission",
"submission.workflowType.editedVolume.label",
"submissions.declined",
"submissions.incomplete",
"todo",
"user.affiliation",
"user.authorization.accessibleWorkflowStage",
"user.email",
"user.emailAddress",
"user.familyName",
"user.givenName",
"user.gossip",
"user.logOut",
"user.orcid",
"user.password",
"user.removeRole.message",
"user.username",
"userInvitation.cancel.goBack",
"userInvitation.cancel.message",
"userInvitation.edit.message",
"userInvitation.edit.title",
"userInvitation.emailField.description",
"userInvitation.modal.button",
"userInvitation.modal.message",
Expand All @@ -513,8 +532,9 @@
"userInvitation.roleTable.journalMasthead",
"userInvitation.roleTable.role",
"userInvitation.roleTable.startDate",
"userInvitation.search.userFound",
"userInvitation.search.userNotFound",
"userInvitation.status.invited",
"userInvitation.usernameField.description",
"validator.required",
"workflow.review.externalReview",
"workflow.review.internalReview"
"validator.required"
]

0 comments on commit d6f9096

Please sign in to comment.