Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#64240 closed defect (bug) (fixed)

Nested notes are not deleted or trashed when parent note is

Reported by: adamsilverstein Owned by: adamsilverstein
Priority: normal Milestone: 6.9
Component: Notes Version: 6.9
Severity: normal Keywords: has-patch has-unit-tests commit dev-reviewed
Cc: Focuses:

Description

Originally reported by @desrosj in https://github.com/WordPress/gutenberg/issues/72862

When a note has replies and you click delete, you are presented with the following: "Are you sure you want to delete this note? This will also delete all of this note's replies."

I agree that this is the desired behavior. However, this is not the case. The child notes are not deleted at all, they only disappear because their parent note has been trashed.

Change History (20)

@adamsilverstein commented on PR #10496:


10 months ago
#2

This pull request is missing a link to a Trac ticket. For a contribution to be considered, there must be a corresponding ticket in Trac.

I created a Trac ticket to cover this PR and linked in the description.

#3 @adamsilverstein
10 months ago

  • Keywords commit added
  • Owner set to adamsilverstein
  • Status newassigned

@adamsilverstein commented on PR #10496:


10 months ago
#4

@desrosj Thanks for the feedback which I have addressed.

#5 @desrosj
10 months ago

  • Component CommentsNotes

Moving tickets related to the new Notes feature into the new Notes sub-component under Comments.

@shailu25 commented on PR #10496:


10 months ago
#6

Could we include the ticket number in the unit test?

@adamsilverstein commented on PR #10496:


10 months ago
#7

Could we include the ticket number in the unit test?

Oh, good idea. I wrote those before creating the ticket. Adding now...

#8 @adamsilverstein
10 months ago

  • Resolutionfixed
  • Status assignedclosed

In 61248:

Notes: trash (or delete) child notes when parent is deleted.

Ensure that when a top level note is trashed (or deleted), all of its replies (children) are also trashed or deleted. If EMPTY_TRASH_DAYS is 0, notes are deleted immediately; otherwise they are marked as trash for later cleanup.

Props adamsilverstein, desrosj, wildworks, mamaduka, karthickmurugan, jeffpaul, shailu25.
Fixes #64240.

#9 @adamsilverstein
10 months ago

  • Resolution fixed
  • Status closedreopened

reopening to consider back porting to the 6.9 branch.

cc: @desrosj

This ticket was mentioned in Slack in #core by wildworks. View the logs.


10 months ago

#11 @wildworks
10 months ago

reopening to consider back porting to the 6.9 branch.

Approved ✅

#12 @peterwilsoncc
10 months ago

  • Keywords dev-reviewed added

Keyword management per @wildworks' comment above.

#13 @JeffPaul
10 months ago

Seems like this likely missed the deadline for RC2, so given the second committer signoff let's work to get backported this week so it lands ahead of RC3 next week.

#14 @wildworks
10 months ago

@adamsilverstein, do you have the bandwidth to do a backport commit? Or should the backport commit be made by someone other than the commiter who committed to trunk? I have not yet performed a backport commit, but would be happy to try if necessary.

#15 @adamsilverstein
10 months ago

@wildworks The guidelines say: When porting a commit from trunk back to versioned branches, it’s best done by different committer than the one who made the trunk commit, as an extra layer of review.

Here are the details on how to do the backport:
https://make.wordpress.org/core/handbook/best-practices/backporting-commits/

Do you want to give it a try? Otherwise maybe @davidbaumwald can help.

I have only done backports a couple of times and always review and follow the instructions. There was also a recent discussion in the core-committer channel where @peterwilsoncc shared a script he uses.

#16 @wildworks
10 months ago

@adamsilverstein Yes, I'll try that later today. When I'm ready, I'll go through the #core-commiters channel to make sure the steps and commit message are correct before committing.

This ticket was mentioned in Slack in #core-committers by wildworks. View the logs.


10 months ago

#18 @wildworks
10 months ago

In 61274:

Notes: trash (or delete) child notes when parent is deleted.

Ensure that when a top level note is trashed (or deleted), all of its replies (children) are also trashed or deleted. If EMPTY_TRASH_DAYS is 0, notes are deleted immediately; otherwise they are marked as trash for later cleanup.

Reviewed by wildworks.
Merges [61248] to the 6.9 branch.

Props adamsilverstein, desrosj, wildworks, mamaduka, karthickmurugan, jeffpaul, shailu25.
See #64240.

#19 @wildworks
10 months ago

  • Resolutionfixed
  • Status reopenedclosed

#20 @adamsilverstein
10 months ago

Nicely done @wildworks - thank you!

Note: See TracTickets for help on using tickets.