Modify

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#6535 closed defect (fixed)

Error when trying to edit comment using TicketChangePlugin

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: TracBacksPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

When using the TicketChangePlugin and trying to edit a comment added by the TracBacksPlugin, I get the following error:

Change Ticket Comments

Ticket change '6' not found. Please try again.

Attachments (0)

Change History (4)

comment:1 Changed 14 years ago by Ryan J Ollos

I had thought this issue may be related to #5767 of the TicketChangePlugin, but can't be sure at this point because testing shows that I can't edit with the TicketChangePlugin ANY comment generated by the TracBacksPlugin.

comment:2 Changed 14 years ago by Ryan J Ollos

Owner: changed from Mel Chua to Ryan J Ollos

Reassigning to new maintainer.

comment:3 Changed 13 years ago by Ryan J Ollos

There is a column oldvalue in the ticket_change table, see t:TracDev/DatabaseSchema. This plugin seems to be taking advantage of the apparent fact that oldvalue contains the comment number. In the case of a normal comment, it will just be a number X, so e.g. for this comment the number will be '9'. However, if the comment is a reply to another comment then the value will be a 'X.Y'. for example if the comment I am making here was a reply to comment 1, then the value would be '1.9'. This seems to be a strange hack inside of Trac. Normally, comments are identified by a timestamp.

This behavior could be improved upon if we knew the timestamp of the comment that the user was trying to edit, but I don't see a way to do that, and I suspect neither did the original plugin author.

If we keep the existing behavior, then all plugins that add comments to Trac, such as TracBacksPlugin and the Mylyn interface (#6930), will need to add a comment number to the old_value.

comment:4 Changed 13 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

(In [9658]) Insert the 'cnum' when creating a comment so that it will be possible to edit the comment using the TicketChangePlugin. Fixes #6535.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.