Edgewall Software
Modify

Opened 17 years ago

Closed 16 years ago

#7075 closed enhancement (fixed)

Add ticket comment number to comment header line

Reported by: Norbert Unterberg <nunterberg@…> 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 Christian Boos, 17 years ago

Milestone: 0.11.1

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.

comment:2 by jsiirola@…, 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.

comment:3 by osimons, 16 years ago

Milestone: 0.11.20.11.1
Owner: changed from Christian Boos to osimons

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?

in reply to:  3 ; comment:4 by Christian Boos, 16 years ago

Alternative proposal:

  • trac/ticket/templates/ticket.html

     
    2323      jQuery(document).ready(function($) {
    2424        $("div.description").find("h1,h2,h3,h4,h5,h6").addAnchor("Link to this section");
    2525      <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");
    2727
    2828        /* only enable control elements for the currently selected action */
    2929        var actions = $("#action input[name='action']");
     
    202202          <div id="changelog">
    203203            <form py:for="change in changes" method="get" action="#comment" class="printableform">
    204204              <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"
    207207                        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>
    208209                    <py:if test="change_replies or 'replyto' in change">
    209210                      <py:if test="'replyto' in change">
    210211                        in reply to: ${commentref('&uarr;&nbsp;', 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".

in reply to:  4 comment:5 by osimons, 16 years ago

Replying to cboos:

Alternative proposal:

Looks good as well. Commit, please :-)

comment:6 by Christian Boos, 16 years ago

Well, the right alignment is not perfect, I need to fix it first.

comment:7 by Christian Boos, 16 years ago

Milestone: 0.11.10.12
Owner: changed from osimons to Christian Boos
Status: newassigned

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.

comment:8 by Christian Boos, 16 years ago

Resolution: fixed
Status: assignedclosed

Implemented in [7255].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.