#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:
Attachments (0)
Change History (4)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Owner: | changed from Mel Chua to Ryan J Ollos |
---|
Reassigning to new maintainer.
comment:3 Changed 14 years ago by
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 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → 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.
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.