WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 months ago

#43805 closed enhancement (fixed)

Add "in reply to" in comment moderation email notification

Reported by: galbaras Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch has-unit-tests commit
Focuses: administration Cc:

Description (last modified by SergeyBiryukov)

The comment moderation notification email provides quick ways to moderate comments, which can save time and hassle.

Sadly, the "in reply to" information, which is available on the moderation page, is missing from these emails, so moderators lack some of the context of the comment.

As you can imagine, the meaning of a comment is vastly different when it relates to the post, as opposed to some stupid comment that someone made, and may make a difference to the moderation outcome.

Therefore, at least when reply threading is enabled, moderation emails should include the "in reply to" comment link and author name.

While we're at it, both the moderation page and email would benefit from the actual replied-to comment to be shown, in order to avoid the hassle of another page load to enable proper moderation.

This can be done in combination with #33627, where every change done on the moderation page is also reflected in the emails.

Attachments (3)

43805.diff (718 bytes) - added by danieltj 2 years ago.
Include post parent URL in notify mod email
43805.2.diff (1011 bytes) - added by andraganescu 4 months ago.
Refreshed patch 43805.diff
43805.3.diff (5.7 KB) - added by imath 3 months ago.

Download all attachments as: .zip

Change History (14)

#1 @danieltj
2 years ago

  • Keywords needs-patch added

I'm for adding an in reply to link with a link to the comment within the wp-admin, but I'm against any other information. Considering the fact you're moderating the reply, having the replied to comment itself doesn't seem necessary here.

@danieltj
2 years ago

Include post parent URL in notify mod email

#2 @danieltj
2 years ago

  • Focuses administration added
  • Keywords has-patch needs-testing added; needs-patch removed

I've added 43805.diff which includes the URL to the parent comment if one has been set. I was going to change the milestone to Future Release but let's see what people think. Haven't managed to test the patch yet, but if someone wants to give it a try and provide any feedback, please do.

#3 @SergeyBiryukov
2 years ago

  • Description modified (diff)

#5 @SergeyBiryukov
9 months ago

  • Milestone changed from Awaiting Review to 5.3
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#6 @davidbaumwald
6 months ago

  • Milestone changed from 5.3 to Future Release

This ticket hasn't received much attention this cycle. With the deadline for enhancements in 5.3 now passed with Beta 1, this is being moved to Future Release.

#7 @SergeyBiryukov
4 months ago

  • Milestone changed from Future Release to 5.4

@andraganescu
4 months ago

Refreshed patch 43805.diff

#8 @andraganescu
4 months ago

I refreshed the patch in 43805.2.diff because the existing one did not apply cleanly with grunt patch:43805.

Still needs testing.

@imath
3 months ago

#9 @imath
3 months ago

  • Keywords has-unit-tests added; needs-testing removed

Hi @andraganescu

Thanks a lot for the patch and for refreshing it.

  1. I advise you to use the --no-prefix option when building your patch so that people using SVN can apply it.
  2. I believe it's best to cast the comment_parent as an integer for the strict comparison as get_comment() is returning a string for the comment_parent property.
  3. I guess if we include the "in reply to" information for post authors, we should probably also include this information for moderators.

43805.3.diff is adding these 3 points and 4 unit tests. I've also tested the patch regularly with success.

#10 @imath
2 months ago

  • Keywords commit added

Hi !

I've tested the patch once more to be sure. I confirm it behaves as expected and I believe it's Ok to commit it. Thanks everyone for your contributions on this ticket.

#11 @SergeyBiryukov
2 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 47114:

Comments: Add In reply to: %s parent comment link to new comment email notifications.

This information was previously available on the Moderate Comment screen in the admin, but was missing from moderation emails.

Props imath, danieltj, andraganescu, galbaras, SergeyBiryukov.
Fixes #43805. See #43429.

Note: See TracTickets for help on using tickets.