Modify

Opened 14 years ago

Closed 13 years ago

#6930 closed defect (wontfix)

Can't edit comments added through Mylyn

Reported by: Steve Strobel Owned by: Sergei Luchko
Priority: normal Component: TicketChangePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

This plugin works great for me with Trac V0.11.7 for comments added through Trac itself. Recently I started using Mylyn inside of Eclipse to create and add comments to Trac tickets. It generally works well, but for some reason comments added through Mylyn can't be edited using this plugin; I just get a message like:

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

I can add a following comment to the same ticket through Trac and edit it (in this example as change '2') without problems. I suppose the "problem" could be in Mylyn, but since it shows up only when using this plugin, I am not sure how to report it there.

Attachments (0)

Change History (7)

comment:1 Changed 14 years ago by Steve Strobel

This ticket probably has the same root cause as the one reported in Ticket #5767 (Editing a comment with {....} formatting doesn't work consistently).

comment:2 Changed 13 years ago by Ryan J Ollos

Unless we figure out a way to do things better in the TicketChangePlugin, the Mylyn plugin will need to be modified to fix this issue. For details, see comment:3:ticket:6535.

comment:3 Changed 13 years ago by Ryan J Ollos

Are you referring to MylynTracConnector or EclipseTracPlugin? I can look into working up a patch.

comment:4 Changed 13 years ago by osimons

Or even XmlRpcPlugin as I suspect that is involved via the Mylyn Trac connector...? If so comments are pushed into the database via the RPC code. Here is some 'inspiration' that may be related:

Not knowing anything about the plugin that this ticket is about, I suspect this is related to lookup via 'time' vs 'cnum' (change number that may or may not be set for various reasons).

comment:5 Changed 13 years ago by Steve Strobel

Replying to rjollos:

Unless we figure out a way to do things better in the TicketChangePlugin, the Mylyn plugin will need to be modified to fix this issue. For details, see comment:3:ticket:6535.

Modifying MylynTracConnector to set oldvalue the way TicketChangePlugin expects would certainly be better than nothing, but it doesn't help with incompatible comments already in Trac databases and the same effort would also be required for each other method that can be used to create Trac tickets (TracBacksPlugin, MailToTracPlugin, etc.).

Ideally I would like to find another way for TicketChangePlugin to refer to the comments, even if that means making a change to the core of Trac to support it (while keeping most of the editing functionality as a plugin).

If it is technically possible, I suppose a middle ground would be to find a way to "fix up" the oldvalue on comments, maybe by iterating through the list of comments for a ticket and changing oldvalue as needed.

comment:6 in reply to:  5 Changed 13 years ago by osimons

Replying to skstrobel:

Modifying MylynTracConnector to set oldvalue the way TicketChangePlugin expects would certainly be better than nothing

I think you missed my hint when I tried to connect the dots in the previous comment: MylynTracConnector can never set any comment number. The internals of ticket updates is all handled by the XmlRpcPlugin that it connects to, and this code has never set the cnum value which since Trac 0.12 is set by ticket save() method anyway (if not provided).

comment:7 Changed 13 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Thanks for the comments osimons. It makes sense now.

Since this plugin is deprecated as of Trac 0.12, I'm closing this as wontfix and making a note on the plugin's main page.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Sergei Luchko.
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.