-
Notifications
You must be signed in to change notification settings - Fork 48
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#10874 Remove submission stage from roles installation #858
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
012e900
pkp/pkp-lib#10874 Remove submission stage from roles installation
Vitaliy-1 1228378
pkp/pkp-lib#10874 Remove submission stage ID from user_group_stage du…
Vitaliy-1 baa4f37
pkp/pkp-lib#10874 Check if tests are failing because of viewport dime…
Vitaliy-1 99ef036
Submodule update ##Vitaliy-1/i10874_groups_stages##
Vitaliy-1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
classes/migration/upgrade/v3_5_0/I10874_UserGroupStagesRemoveSubmission.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
/** | ||
* @file classes/migration/upgrade/v3_5_0/I10874_UserGroupStagesRemoveSubmission.php | ||
* | ||
* Copyright (c) 2025 Simon Fraser University | ||
* Copyright (c) 2025 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class I10874_UserGroupStagesRemoveSubmission | ||
* | ||
* @brief Remove WORKFLOW_STAGE_ID_SUBMISSION stage from user_group_stage table | ||
*/ | ||
|
||
namespace APP\migration\upgrade\v3_5_0; | ||
|
||
use Illuminate\Support\Collection; | ||
use Illuminate\Support\Facades\DB; | ||
use PKP\migration\Migration; | ||
|
||
class I10874_UserGroupStagesRemoveSubmission extends Migration | ||
{ | ||
public const WORKFLOW_STAGE_SUBMISSION = 1; | ||
|
||
protected Collection $rowsWithSubmissionStage; | ||
|
||
public function up(): void | ||
{ | ||
$this->rowsWithSubmissionStage = DB::table('user_group_stage') | ||
->where('stage_id', self::WORKFLOW_STAGE_SUBMISSION) | ||
->get(); | ||
|
||
DB::table('user_group_stage')->where('stage_id', self::WORKFLOW_STAGE_SUBMISSION)->delete(); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
$toInsert = []; | ||
foreach ($this->rowsWithSubmissionStage as $row) { /* @var \stdClass $row */ | ||
$toInsert[] = [ | ||
'context_id' => $row->context_id, | ||
'user_group_id' => $row->user_group_id, | ||
'stage_id' => $row->stage_id, | ||
]; | ||
} | ||
|
||
DB::table('user_group_stage')->insert($toInsert); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule pkp
updated
60 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Viewport dimensions appear to be related to test failures. Because of the new UI, especially for the submission workflow page, often it's not enough screen width and/or height to press a button, because it requires scrolling, e.g., to post a submission.
scrollIntoView
doesn't work reliably in my case. I think this way we can avoidforcing
a button click, which we do in several places.