Some comments incorrectly disappear for users not in the timetracking group

RESOLVED FIXED in Bugzilla 4.0

Status

()

Bugzilla
Creating/Changing Bugs
--
major
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

({regression})

Bugzilla 4.0
regression
Bug Flags:
approval +
approval4.0 +
blocking4.0 +

Details

Attachments

(1 attachment)

988 bytes, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
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.
(Assignee)

Comment 1

8 years ago
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)
(Assignee)

Comment 2

8 years ago
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
(Assignee)

Updated

8 years ago
Depends on: 271913
Flags: blocking4.0+
Target Milestone: --- → Bugzilla 4.0
(Assignee)

Comment 3

8 years ago
(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 4

8 years ago
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+

Updated

8 years ago
Flags: approval4.0+
Flags: approval+
(Assignee)

Comment 5

8 years ago
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/bug/comments.html.tmpl
Committed revision 7442.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/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.