Comment 1 for bug 1183648

Revision history for this message
Robert Lyon (robertl-9) wrote :

Yes it looks like a comment that starts off private then made public or starts off public then made private does not respect the youngest comment situation.

Looking at the code the 'youngest comment' is selected by last_public_comment() function, which wants the private = 0 and newest creation time. So when a comment changes from private = 0 to private = 1 the next youngest becomes the youngest.
So you can end up with two (or more) logically being allowed to be edited simply by adding some comments and then toggling the public/private checkbox for each latest 'public' one.

To fix we need to have a more robust check done in last_public_comment() to take in account comments that have had public/private changed and if they are pending moderation etc.