Changes between Initial Version and Version 6 of Ticket #10194
- Timestamp:
- Mar 21, 2013, 2:13:10 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10194
- Property Cc Jun Omae falkb added; anonymous removed
- Property Owner changed from Noah Kantrowitz to Ryan J Ollos
-
Property
Status
changed from
new
toassigned
-
Ticket #10194 – Description
initial v6 1 This was found in the TicketImportPlugin, see #10188, and took me some time to debug. The following piece of code (given an `env` environment): 1 2 2 This was found in the TicketImportPlugin, see #10188, and took me some time to debug. The following piece of code (given and "env" environment):3 3 {{{ 4 from trac.ticket.web_ui import Ticket 5 from datetime import datetime 6 from trac.util.datefmt import utc 7 ticket = Ticket(env) 8 ticket['summary'] = 'The summary' 9 ticket.insert() 10 ticket['blockedby'] = str(ticket.id) 11 ticket.save_changes('someone',comment='Some comments', when=datetime.now(utc)) 4 #!python 5 from trac.ticket.web_ui import Ticket 6 from datetime import datetime 7 from trac.util.datefmt import utc 8 ticket = Ticket(env) 9 ticket['summary'] = 'The summary' 10 ticket.insert() 11 ticket['blockedby'] = str(ticket.id) 12 ticket.save_changes('someone', comment='Some comments', 13 when=datetime.now(utc)) 12 14 }}} 13 15 14 16 will work if the MasterTicketsPlugin is not installed, but will fail if it is installed, with the following error: 15 17 {{{ 16 ticket.save_changes('someone','Some comments', when=datetime.now(utc)) 18 ticket.save_changes('someone', 'Some comments', 19 when=datetime.now(utc)) 17 20 File "/Users/francois/ticketimportplugin/0.11/env2.5/lib/python2.5/site-packages/Trac-0.12-py2.5.egg/trac/ticket/model.py", line 353, in save_changes 18 21 listener.ticket_changed(self, comment, author, old_values)