"[reply]" link beside the original description will insert ("in reply to comment #N+1") when the comments order is "Newest to Oldest, but keep Descritption at the top" .

RESOLVED FIXED in Bugzilla 4.2

Status

()

Bugzilla
Creating/Changing Bugs
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jekyll Wu, Assigned: Simon Green)

Tracking

4.2.4
Bugzilla 4.2
Bug Flags:
approval +
approval4.4 +
approval4.2 +

Details

Attachments

(1 attachment, 1 obsolete attachment)

4.41 KB, patch
Frédéric Buclin
: review+
Details | Diff | Splinter Review
(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11

Steps to reproduce:

1. In user preference, change comment showing order to "Newest to Oldest, but keep the Description at the top" .

2. go to some report containing a few comments,  like https://bugzilla.mozilla.org/show_bug.cgi?id=413745 which has comments  #11 as its latest comment at the moment. 

3. click the "[reply]" like beside the original description at the top




Actual results:

It inserts text  "(In reply to Henrik Skupin (:whimboo) from comment #12)"

12 = 


Expected results:

It inserts text  "(In reply to Henrik Skupin (:whimboo) from comment #0)"
(Reporter)

Comment 1

5 years ago
I originally noticed and reported the problem at https://bugs.kde.org/show_bug.cgi?id=312846.

Comment 2

5 years ago
Confirmed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Updated

5 years ago
Assignee: general → hugo.seabrook
(Assignee)

Comment 3

5 years ago
Created attachment 704202 [details] [diff] [review]
v1 patch

I think this is the best solution for this bug. Bugzilla::Bug sets the comment for each one that is correct. If it is too hackish, feel free to propose the correct™ solution.

Regards,
Hugo
Attachment #704202 - Flags: review?
(Assignee)

Updated

5 years ago
Status: NEW → ASSIGNED

Comment 4

5 years ago
Comment on attachment 704202 [details] [diff] [review]
v1 patch

I think $comment->count should be used everywhere instead of the self-made $count variable. This would avoid this new parameter sent to replyToComment() and would also make the UI more consistent as the bug description would always be accessible via #c0.

The $count variable was implemented in the template well before $comment->count was implemented, and the template has never been updated since then. Reassign the bug to me if you don't want to do the code cleanup yourself.
Attachment #704202 - Flags: review? → review-

Comment 5

5 years ago
(In reply to Frédéric Buclin from comment #4)
> description would always be accessible via #c0.

In fact, this refactoring is necessary, because writing "comment 0" in a comment makes it point to #c0, but #c0 doesn't exist when the user pref is set to newest_to_oldest_desc_first.
Component: Bugzilla-General → Creating/Changing Bugs
Target Milestone: --- → Bugzilla 4.2
(Assignee)

Comment 6

5 years ago
Created attachment 717805 [details] [diff] [review]
v2 patch
Attachment #704202 - Attachment is obsolete: true
Attachment #717805 - Flags: review?(LpSolit)

Comment 7

5 years ago
Comment on attachment 717805 [details] [diff] [review]
v2 patch

Nice cleanup! Thanks! :) r=LpSolit
Attachment #717805 - Flags: review?(LpSolit) → review+

Comment 8

5 years ago
The patch doesn't apply cleanly to the 4.2 branch, but it's easy to fix. I will do it on checkin.
Flags: approval4.4+
Flags: approval4.2+
Flags: approval+

Comment 9

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

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.4/
modified template/en/default/filterexceptions.pl
modified template/en/default/bug/comments.html.tmpl
Committed revision 8533.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.2/
modified template/en/default/filterexceptions.pl
modified template/en/default/bug/comments.html.tmpl
Committed revision 8197.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.