Skip to content

Commit

Permalink
#10874 Omit WORKFLOW_STAGE_ID_SUBMISSION stage for OPS
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy-1 committed Feb 5, 2025
1 parent 1416c01 commit 7b53dd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion controllers/grid/settings/sections/form/PKPSectionForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public function fetch($request, $template = null, $display = false)
$assignableUserGroups = UserGroup::query()
->withContextIds([$request->getContext()->getId()])
->withRoleIds($this->assignableRoles)
->withStageIds([WORKFLOW_STAGE_ID_SUBMISSION])
->withStageIds([
// WORKFLOW_STAGE_ID_SUBMISSION for OJS/OMP and WORKFLOW_STAGE_ID_PRODUCTION for OPS, see pkp/pkp-lib#10874
min(Application::getApplicationStages())
])
->get()
->map(function (UserGroup $userGroup) use ($request) {
return [
Expand Down
5 changes: 4 additions & 1 deletion pages/submission/PKPSubmissionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,10 @@ protected function getWorkflowUrl(Submission $submission, User $user): string
// Replaces StageAssignmentDAO::getBySubmissionAndRoleIds
$hasStageAssignments = StageAssignment::withSubmissionIds([$submission->getId()])
->withRoleIds([Role::ROLE_ID_AUTHOR])
->withStageIds([WORKFLOW_STAGE_ID_SUBMISSION])
->withStageIds([
// WORKFLOW_STAGE_ID_SUBMISSION for OJS/OMP and WORKFLOW_STAGE_ID_PRODUCTION for OPS, see pkp/pkp-lib#10874
min(Application::getApplicationStages())
])
->withUserId($user->getId())
->exists();

Expand Down

0 comments on commit 7b53dd0

Please sign in to comment.