8

This is somehow a continuation of my bug report Comment appears in the inbox, but not in the responses (with the exact same title, but the previous bug was fixed).

Yesterday I got 4 comment @replies from Gilles in my inbox, all on the post How do comment @replies work? Some of those comments are edited and didn't include "@Hendrik" when they were first posted, but some contained "@Hendrik" from the very beginning. However, none of the comments appears in the "responses" in my profile's "activity" tab. (There are only 2 entries for yesterday in the "responses", both of them comment @replies that came due to others using "@Hendrik".)

1 Answer 1

9

Those comments should have worked, this stemmed from an error in our responses SQL, the portion that grabs @reply comments wasn't quite right and is now fixed.

You'll now see these comment replies in your responses tab.


Since many users like detailed bug porn, here's what was wrong:

SELECT c.ReplyToUserId, c.UserId, c.CreationDate, c.Id, 2
FROM PostComments c
     INNER JOIN Posts p ON p.Id = c.PostId
WHERE p.OwnerUserId <> c.ReplyToUserId
  AND p.DeletionDate IS NULL
  AND c.DeletionDate IS NULL

The problem with this was that in SQL server that <> comparison is just thrown out in the case of an answer like you linked, since p.OwnerUserId is NULL on those posts. Since we want to show it doesn't match the owner in this case a simple IsNull(p.OwnerUserId, 0) will suffice...and that's deployed across all sites now.

1
  • Thanks a lot, I do now see the comments in my responses - great! Also thanks for the porn, even if I don't understand it. Commented May 26, 2011 at 12:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .