Modify

Opened 5 years ago

Closed 4 years ago

#6930 closed defect (wontfix)

Can't edit comments added through Mylyn

Reported by: steve.strobel@… Owned by: SergeiLuchko
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 5 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 4 years ago by 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.

comment:3 Changed 4 years ago by rjollos

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

comment:4 Changed 4 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 follow-up: Changed 4 years ago by skstrobel

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

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

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.

Add Comment

Modify Ticket

Action
as closed The owner will remain SergeiLuchko.
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.