Changes between Initial Version and Version 27 of Ticket #12430


Ignore:
Timestamp:
Nov 4, 2015, 1:50:00 AM (8 years ago)
Author:
Ryan J Ollos
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12430

    • Property Status changed from new to reopened
  • 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.
     1I 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.
    22
    3 I am attempting this with a simple example:[[BR]]
     3I am attempting this with a simple example:
    44
    5 p = xmlrpclib.ServerProxy(trac_server % (user_name, password))[[BR]]
     5{{{#!python
     6p = xmlrpclib.ServerProxy(trac_server % (user_name, password))
    67
     8ticketNumber = p.ticket.get(92)
     9about = 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}}}
    728
    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]]
     29However, I am getting the following error:
     30{{{
    3031Fault: <Fault 1: "''dict' object has no attribute 'strip'' while executing 'ticket.update()'">
     32}}}
    3133
    3234What is the correct syntax for this function?