I first saw that on landfill at https://landfill.bugzilla.org/bugzilla-tip/show_bug.cgi?id=2455, where comments 5 and 7 are not private, but are not displayed to logged out users anyway. I can also reproduce the problem locally, but in a somewhat random fashion. When you mark a comment as private, then log out and visit the bug again, not only your comment is now hidden (as expected), but some other comments are too! I cannot really understand why, so far, nor am I sure that 4.0 is badly affected, because it's harder to reproduce, though not impossible.
Created attachment 467982 [details] [diff] [review] patch, v1 There were several problems involved in this bug. First, TT doesn't see "0.00" as a number and so comment.work_time != 0 is always true. I use the same fix as in show.xml.tmpl, see bug 341538 comment 6, i.e. force TT to see it as a number. Second, comment.body is empty when you e.g. mark the bug as a duplicate, and so if you set work_time at the same time as your mark the bug as a dupe, the comment is ignored. My patch fixes all these problems.
Assignee: create-and-change → LpSolit
Status: NEW → ASSIGNED
Attachment #467982 - Flags: review?(mkanat)
The problem is really about not being in the timetracking group. The symptom described in comment 0 has nothing to do with the insider group.
Summary: When marking a comment as private, some other comments also disappear for users not in the insider group → Some comments incorrectly disappear for users not in the timetracking group
Depends on: 271913
Target Milestone: --- → Bugzilla 4.0
(In reply to comment #1) > Second, comment.body is empty when you e.g. mark the bug as a > duplicate, and so if you set work_time at the same time as your mark the bug as > a dupe, the comment is ignored. Even worse! work_time is not important, per the first issue. So if you are not in the timetracking group, and you e.g. attach a file or mark the bug as a dupe without adding a comment, you don't see the comment at all.
Severity: normal → major
Comment on attachment 467982 [details] [diff] [review] patch, v1 Looks good! For clarity's sake, could you wrap "comment.work_time - 0" in parens, on checkin?
Attachment #467982 - Flags: review?(mkanat) → review+
Committing to: bzr+ssh://firstname.lastname@example.org/bugzilla/trunk/ modified template/en/default/bug/comments.html.tmpl Committed revision 7442. Committing to: bzr+ssh://email@example.com/bugzilla/4.0/ modified template/en/default/bug/comments.html.tmpl Committed revision 7383.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.