-
Notifications
You must be signed in to change notification settings - Fork 448
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#5885 Review remainder update #9612
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
6553659
pkp/pkp-lib#5885 Review remainder update
touhidurabir 1c6b007
pkp/pkp-lib#5885 Review remainder update issues fixed
touhidurabir 4634d89
pkp/pkp-lib#5885 typo fixed
touhidurabir 763efa1
pkp/pkp-lib#5885 update remainder calculation
touhidurabir b5f216f
pkp/pkp-lib#5885 removed unnecessary select from migration
touhidurabir 9534d0b
pkp/pkp-lib#5885 updated and added new from component to handle reminder
touhidurabir 10c5684
pkp/pkp-lib#5885 removed unnecessary fields and controls with field r…
touhidurabir 1c252e1
pkp/pkp-lib#5885 updated using new slider component
touhidurabir 9eabe38
pkp/pkp-lib#5885 updated job class properties to public
touhidurabir 88250e1
pkp/pkp-lib#5885 updated date validation rules to enum
touhidurabir 7644c86
pkp/pkp-lib#5885 fixed displaying error on date comparison validation…
touhidurabir 3c6e156
pkp/pkp-lib#5885 test added for queue job
touhidurabir 25881f3
pkp/pkp-lib#5885 added mocked context service and context class for j…
touhidurabir c87ff62
pkp/pkp-lib#5885 added context checking first if available to resolve…
touhidurabir 2f3f023
pkp/pkp-lib#5885 job test update
touhidurabir a10b50a
pkp/pkp-lib#5885 job test update
touhidurabir 8b0ff12
pkp/pkp-lib#5885 removed mistakenly pulled BaseInvitation during rebase
touhidurabir 182d711
pkp/pkp-lib#5885 updated job and test based on new inviation function…
touhidurabir 2391787
pkp/pkp-lib#5885 updated task
touhidurabir 0c1cc5d
pkp/pkp-lib#5885 translation update
touhidurabir f77d1e6
pkp/pkp-lib#5885 tests updated and removed reference of deprecated Se…
touhidurabir 98a5db2
pkp/pkp-lib#5885 test update
touhidurabir e967484
pkp/pkp-lib#5885 test update
touhidurabir 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
/** | ||
* @file classes/form/validation/FormValidatorDateCompare.php | ||
* | ||
* Copyright (c) 2014-2024 Simon Fraser University | ||
* Copyright (c) 2000-2024 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class FormValidatorDateCompare | ||
* | ||
* @ingroup form_validation | ||
* | ||
* @see FormValidator | ||
* | ||
* @brief Form validation to validation comparison rule for a date field | ||
*/ | ||
|
||
namespace PKP\form\validation; | ||
|
||
use PKP\form\Form; | ||
use PKP\validation\ValidatorDateComparison; | ||
use PKP\validation\enums\DateComparisonRule; | ||
use Carbon\Carbon; | ||
use DateTimeInterface; | ||
|
||
class FormValidatorDateCompare extends FormValidator | ||
{ | ||
/** | ||
* Constructor. | ||
* | ||
* @param Form $form the associated form | ||
* @param string $field the name of the associated field | ||
* @param DateTimeInterface|Carbon $comparingDate the comparing date | ||
* @param DateComparisonRule $comparingRule the comparing rule | ||
* @param string $type the type of check, either "required" or "optional" | ||
* @param string $message the error message for validation failures (i18n key) | ||
*/ | ||
public function __construct(&$form, $field, $comparingDate, $comparingRule, $type = 'optional', $message = 'validator.date.comparison') | ||
{ | ||
$validator = new ValidatorDateComparison($comparingDate, $comparingRule); | ||
parent::__construct($form, $field, $type, $message, $validator); | ||
} | ||
} |
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
59 changes: 59 additions & 0 deletions
59
classes/migration/upgrade/v3_5_0/I5885_RenameReviewReminderSettingsName.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,59 @@ | ||
<?php | ||
|
||
/** | ||
* @file classes/migration/upgrade/v3_5_0/I5885_RenameReviewReminderSettingsName.php | ||
* | ||
* Copyright (c) 2014-2024 Simon Fraser University | ||
* Copyright (c) 2000-2024 John Willinsky | ||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING. | ||
* | ||
* @class I5885_RenameReviewReminderSettingsName | ||
* | ||
* @brief Rename the review reminder settings name | ||
*/ | ||
|
||
namespace PKP\migration\upgrade\v3_5_0; | ||
|
||
use Illuminate\Support\Facades\DB; | ||
use PKP\migration\Migration; | ||
|
||
abstract class I5885_RenameReviewReminderSettingsName extends Migration | ||
{ | ||
abstract protected function getContextSettingsTable(): string; | ||
|
||
/** | ||
* Run the migration. | ||
*/ | ||
public function up(): void | ||
{ | ||
DB::table($this->getContextSettingsTable()) | ||
->where('setting_name', 'numDaysBeforeInviteReminder') | ||
->update([ | ||
'setting_name' => 'numDaysAfterReviewResponseReminderDue' | ||
]); | ||
|
||
DB::table($this->getContextSettingsTable()) | ||
->where('setting_name', 'numDaysBeforeSubmitReminder') | ||
->update([ | ||
'setting_name' => 'numDaysAfterReviewSubmitReminderDue' | ||
]); | ||
} | ||
|
||
/** | ||
* Reverse the migration | ||
*/ | ||
public function down(): void | ||
{ | ||
DB::table($this->getContextSettingsTable()) | ||
->where('setting_name', 'numDaysAfterReviewResponseReminderDue') | ||
->update([ | ||
'setting_name' => 'numDaysBeforeInviteReminder' | ||
]); | ||
|
||
DB::table($this->getContextSettingsTable()) | ||
->where('setting_name', 'numDaysAfterReviewSubmitReminderDue') | ||
->update([ | ||
'setting_name' => 'numDaysBeforeSubmitReminder' | ||
]); | ||
} | ||
} |
Oops, something went wrong.
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.
Should these changes be in a different PR?
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.
that is true but because of this I was having some issue with some of workflow page loading to run some tests
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.
It's already been resolved in
main
in 8ded2f3.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.
Then it will be removed at next rebase
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.
This is still showing up in the PR.
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.
I kept it because we are passing second param as
null
at here which is not allowed as that should be aint
as specified here