Modify

Opened 5 years ago

Closed 4 years ago

Last modified 3 years ago

#6535 closed defect (fixed)

Error when trying to edit comment using TicketChangePlugin

Reported by: rjollos Owned by: rjollos
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 5 years ago by rjollos

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 4 years ago by rjollos

  • Owner changed from mchua to rjollos

Reassigning to new maintainer.

comment:3 Changed 4 years ago by rjollos

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 4 years ago by rjollos

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.