Skip to content

ENH: Ensure the content bell is always showing#2

Open
scott1702 wants to merge 12 commits into4from
pulls/4/content_review_bell
Open

ENH: Ensure the content bell is always showing#2
scott1702 wants to merge 12 commits into4from
pulls/4/content_review_bell

Conversation

@scott1702
Copy link
Copy Markdown

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

*
* @return bool
*/
public function canSendEmail(Member $member = null)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new function for canSendEmail needs some tests added as well

@jareddreyerss jareddreyerss force-pushed the pulls/4/content_review_reminder_emails branch from 29b075b to b79c73e Compare August 11, 2022 05:01
satrun77 and others added 12 commits August 12, 2022 09:51
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
@jareddreyerss jareddreyerss force-pushed the pulls/4/content_review_bell branch from 58847ab to 5146184 Compare August 11, 2022 21:53
@jareddreyerss jareddreyerss changed the base branch from pulls/4/content_review_reminder_emails to 4 August 11, 2022 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants