Closed Bug 584115 Opened 14 years ago Closed 14 years ago

Some comments incorrectly disappear for users not in the timetracking group

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: LpSolit, Assigned: LpSolit)

References

Details

(Keywords: regression)

Attachments

(1 file)

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.
Attached patch patch, v1Splinter Review
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
Flags: blocking4.0+
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+
Flags: approval4.0+
Flags: approval+
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
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: