[#4895] Number comments for easier reference
Summary Number comments for easier reference
Queue Whups
Type Enhancement
State Resolved
Priority 1. Low
Owners Jan Schneider <jan (at) horde (dot) org>
Requester php (at) ideacode (dot) com
Created 01/15/2007 (537 days ago)
Due
Updated 04/04/2008 (92 days ago)
Assigned
Resolved 04/04/2008 (92 days ago)
Attachments
Milestone
Patch No

History
04/04/2008 Jan Schneider State ⇒ Resolved
 
04/04/2008 php (at) ideacode (dot) com Comment #5 Reply to this comment
Looks good to me.
03/10/2008 Jan Schneider Comment #4
State ⇒ Feedback
Assigned to Jan Schneider
Reply to this comment
Implemented #2. I personally think that's sufficient, because even if 
deleting comments, this shouldn't happen too often (mostly as a spam 
protection), so a comment number shift shouldn't hurt too much.
01/18/2007 php (at) ideacode (dot) com Comment #3 Reply to this comment
Probably useful for things like comment feeds and for making nicer
interfaces involving links to tickets.
Recommend cross-linking using URI fragments:

Examples for how to access comment #242:
1. Direct access via a URL:
http://example.com/horde/whups/ticket/?id=142&Horde=MD5HORDEID#242

2. Comment text like this: "Issue 431#242" gets turned into URL like above.
Wouldn't be hard to do if we
created a sequence for each ticket, but that'd be a _lot_ of
sequences. Probably easier to have a table of sequences with two
columns: ticket_id and comment_sequence.
Yep:

CREATE TABLE whups_comment_sequences {
      ticket_id INTEGER NOT NULL,
      next_comment_number INTEGER NOT NULL
}
01/17/2007 Chuck Hagenbuch Comment #2
State ⇒ Accepted
Reply to this comment
Probably useful for things like comment feeds and for making nicer 
interfaces involving links to tickets. Wouldn't be hard to do if we 
created a sequence for each ticket, but that'd be a _lot_ of 
sequences. Probably easier to have a table of sequences with two 
columns: ticket_id and comment_sequence.
01/15/2007 php (at) ideacode (dot) com Comment #1
Priority ⇒ 1. Low
State ⇒ New
Type ⇒ Enhancement
Summary ⇒ Number comments for easier reference
Queue ⇒ Whups
Reply to this comment
It would be helpful to number comments for easier reference,   
especially in the following scenarios:
1. Discussing a ticket over the phone while both parties are looking 
at the ticket online
2. Responding to multiple comments in a single comment block

I see at least two ways to do this:
1. Simply use the value from whups_comments.comment_id
+ Easy to implement
- Not guaranteed to be sequential
2. When rendering, number the comments with oldest = 1
+ Easy to implement
- Comment #s may be inaccurate if comment is deleted
3. Uniquely number comments within a ticket
+ Resilient to deletions of comments
- More difficult to implement

I personally wouldn't mind #1, but I know that will confuse many, if 
not most, users.  I don't immediately recall anyway to delete comments 
from the UI (perhaps that should be another ticket?), so #2 would work 
fine except for when deleted out from under whups in the db directly.   
#3 is probably the best way to go.