Changes between Initial Version and Version 27 of Ticket #12430
- Timestamp:
- Nov 4, 2015, 1:50:00 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #12430
-
Property
Status
changed from
new
toreopened
-
Property
Status
changed from
-
Ticket #12430 – Description
initial v27 1 I am attempting to synchronize my trac tickets with an external database. I need to use the ticket.update()function to modify tickets as they are changed in the database.1 I am attempting to synchronize my trac tickets with an external database. I need to use the `ticket.update()` function to modify tickets as they are changed in the database. 2 2 3 I am attempting this with a simple example: [[BR]]3 I am attempting this with a simple example: 4 4 5 p = xmlrpclib.ServerProxy(trac_server % (user_name, password))[[BR]] 5 {{{#!python 6 p = xmlrpclib.ServerProxy(trac_server % (user_name, password)) 6 7 8 ticketNumber = p.ticket.get(92) 9 about = p.ticket.update( 10 int('92'), 11 {"reporter": "bumpudj", 12 "keywords": "", 13 "version": "4.0.0", 14 "component": "D2D", 15 "owner": "bumpudj", 16 "type": "defect", 17 "resolve": "Not yet resolved", 18 "milestone": "D2D_Sync_Issues", 19 "requestor": "", 20 "status": "", 21 "collective": 6.1, 22 "d2d_id": '12', 23 "action": "resolve", 24 "action_resolve_resolve_resolution": "fixed", 25 "_ts":ticketNumber[3]["_ts"] 26 }) 27 }}} 7 28 8 ticketNumber = p.ticket.get(92)[[BR]] 9 about = p.ticket.update([[BR]] 10 int('92'),[[BR]] 11 {"reporter": "bumpudj",[[BR]] 12 "keywords": "",[[BR]] 13 "version": "4.0.0",[[BR]] 14 "component": "D2D",[[BR]] 15 "owner": "bumpudj",[[BR]] 16 "type": "defect",[[BR]] 17 "resolve": "Not yet resolved",[[BR]] 18 "milestone": "D2D_Sync_Issues",[[BR]] 19 "requestor": "",[[BR]] 20 "status": "",[[BR]] 21 "collective": 6.1,[[BR]] 22 "d2d_id": '12',[[BR]] 23 "action": "resolve",[[BR]] 24 "action_resolve_resolve_resolution": "fixed",[[BR]] 25 "_ts":ticketNumber[3]["_ts"][[BR]] 26 })[[BR]] 27 28 29 However, I am getting the following error:[[BR]] 29 However, I am getting the following error: 30 {{{ 30 31 Fault: <Fault 1: "''dict' object has no attribute 'strip'' while executing 'ticket.update()'"> 32 }}} 31 33 32 34 What is the correct syntax for this function?