Opened 3 years ago
Last modified 2 years ago
When using the TicketChangePlugin and trying to edit a comment added by the TracBacksPlugin, I get the following error:
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.
Reassigning to new maintainer.
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.
(In ) Insert the 'cnum' when creating a comment so that it will be possible to edit the comment using the TicketChangePlugin. Fixes #6535.
Powered by Trac 0.10.6dev
By Edgewall Software.
Hosting sponsored by