Opened 9 years ago

Last modified 9 years ago

#5446 new defect

Ability to specify the comment index when updating a ticket

Reported by: Thijs Triemstra Owned by: Odd Simon Simonsen
Priority: normal Component: XmlRpcPlugin
Severity: major Keywords:
Cc: Thijs Triemstra Trac Release: 0.11


Currently it's not possible to update/replace a specific comment in a ticket. The attached patch should solve this problem.

Attachments (1)

comment-index.patch (1.5 KB) - added by Thijs Triemstra 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by Thijs Triemstra

Attachment: comment-index.patch added

comment:1 Changed 9 years ago by Odd Simon Simonsen

The 'index' is not something returned by ticket.changeLog() to allow you to read it, nor is it acutally part of the database schema for ticket_change. Using the data we have, what about a new method that looks something like this:

int ticket.updateChange(int ticket, datetime time, string field, string newvalue)

It would update the unique record (ticket,time,field) with content newvalue.

If done like this, the method should also be accompanied by a similar ticket.deleteChange() method that deletes the record (using same identification mechanism).

Both these methods should require TICKET_ADMIN permission for the resource.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Odd Simon Simonsen.

Add Comment

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

Note: See TracTickets for help on using tickets.