Open
Conversation
scott1702
commented
May 16, 2022
| * | ||
| * @return bool | ||
| */ | ||
| public function canSendEmail(Member $member = null) |
Author
There was a problem hiding this comment.
All of this code is a duplication of canBeReviewedBy apart from one check so it would be better to do something like
public function canSendEmail(Member $member = null)
{
$canSendEmail = $this->canBeReviewedBy($member);
if ($this->owner->obj("NextReviewDate")->InFuture()) {
$canSendEmail = false;
}
return $canSendEmail;
}
| $this->assertFalse($page->canBeReviewedBy($author)); | ||
| $this->assertTrue($page->canBeReviewedBy($author)); | ||
|
|
||
| DBDatetime::clear_mock_now(); |
Author
There was a problem hiding this comment.
The new function for canSendEmail needs some tests added as well
29b075b to
b79c73e
Compare
Next review due date could be interpreted as when a review will happen i.e. in the future. However the intention of this field is to encourage authors to review *before* this date. Thus "overdue review date" is more appropriate for this label / field name.
When a review date is set on a page the review date is now checked if it falls under any of the configured intervals (default: 7/30/60 days). If true then an email is sent to the owner to remind them that this content needs a review.
Consistency on naming convention.
Changed the content review email template from a Textareafield to an HTMLEditorField with a custom TinyMCEConfig to remove options that won't work
58847ab to
5146184
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Removed the check to only show the content bell if it's past the review date,
meaning that people can now review in advance, rather than after the deadline
cc @Radroaches I'm creating this so it's easier to PR the changes