Changes between Version 2 and Version 3 of Ticket #5402


Ignore:
Timestamp:
Jun 24, 2009 3:01:31 AM (5 years ago)
Author:
osimons
Comment:

I had timestamp in mind for version - alternatively 'version' as a distinct count of timestamps in ticket_change table (more or less what is used for comment-numbers). Anyway, Trac itself uses the timestamp to detect collision so just using that makes the most sense. It is also returned with any ticket.get() and update() call so it easily accessible.

I've made a patch, and again like for 'action' it tries to do so without changing the API. To support update collision, add a time_changed timestamp to attributes when updating. Not using time_changed is deprecated in the patch, so in some future version any update that includes attributes will require those two keys. When working on update(), I also took the time to make a full set of tests for all various incarnations of updating (all passing).

Attaching patch. Review and feedback welcome.

Legend:

Unmodified
Added
Removed
Modified