Opened 17 years ago
Closed 16 years ago
#7075 closed enhancement (fixed)
Add ticket comment number to comment header line
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | normal | Milestone: | 0.12 |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When a ticket comment was added by clicking on the "Reply" button of an existing comment, the new comment's header has the note "in reply to: 13". But since ticket comments do not display the comment number, I have no chance to find comment 13 except I click on the link.
I think it would be a good idea to add the comment number/ID to each comment header line. I then have a chance to follow discussions, even on paper after I do a printout of the ticket.
Attachments (0)
Change History (8)
comment:1 by , 17 years ago
Milestone: | → 0.11.1 |
---|
comment:2 by , 16 years ago
This is something that I have also wanted (in fact, I just hacked it into the ticket.cs for my production 0.10.4 system).
The other significant use is that when someone refers to a comment (e.g. comment:1), there is no reliable way either to create that reference or to identify the referenced comment without counting them or mousing over each permalink. On systems with large monitors/small fonts, simply clicking on the TracLink does not guarantee that the referenced comment will be at the top of the screen (i.e. if it is toward the bottom of the list of comments).
Looking at the new templates, shouldn't implementing this be as easy as adding
${change.cnum}:
to the beginning of ticket.html line 221? I certainly don't think that something so unobtrusive would clutter things up.
follow-up: 4 comment:3 by , 16 years ago
Milestone: | 0.11.2 → 0.11.1 |
---|---|
Owner: | changed from | to
Agree that comments should have some sort of visible ID in all situations, and just prefixing the 'Changed…' line with the comment number works quite well.
Objections or alternative proposals?
follow-up: 5 comment:4 by , 16 years ago
Alternative proposal:
-
trac/ticket/templates/ticket.html
23 23 jQuery(document).ready(function($) { 24 24 $("div.description").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section"); 25 25 <py:when test="ticket.exists"> 26 $("#changelog h3.change ").addAnchor("Link to this change");26 $("#changelog h3.change span.cnum").addAnchor("Link to this change"); 27 27 28 28 /* only enable control elements for the currently selected action */ 29 29 var actions = $("#action input[name='action']"); … … 202 202 <div id="changelog"> 203 203 <form py:for="change in changes" method="get" action="#comment" class="printableform"> 204 204 <div class="change"> 205 <h3 class="change" id="${'cnum' in change and 'comment:%d' % change.cnum or None}">206 <span class="threading" py:if=" replies and'cnum' in change"205 <h3 class="change"> 206 <span class="threading" py:if="'cnum' in change" 207 207 py:with="change_replies = replies.get(str(change.cnum), [])"> 208 <span id="${'cnum' in change and 'comment:%d' % change.cnum or None}" class="cnum">comment:$change.cnum</span> 208 209 <py:if test="change_replies or 'replyto' in change"> 209 210 <py:if test="'replyto' in change"> 210 211 in reply to: ${commentref('↑ ', change.replyto)}
This should look better than the number prefix and is also a reminder or hint about the comment:
TracLinks syntax. Putting the number in the threading span makes sense, as you will see things like: "comment:4 in reply to 3".
comment:5 by , 16 years ago
comment:7 by , 16 years ago
Milestone: | 0.11.1 → 0.12 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Ok, I have a better solution now. However, as this is an enhancement which changes the look and feel of the ticket history in quite visible way, it shouldn't go in 0.11.x.
For printouts, yes, that's a good point.
Let's see if it doesn't clutter the screen too much, so maybe we can have it for the normal display as well.