Opened 18 months ago
Closed 18 months ago
#9645 closed defect (fixed)
work with XMLRPC plugin
| Reported by: | uray | Owned by: | walnut |
|---|---|---|---|
| Priority: | normal | Component: | ChildTicketsPlugin |
| Severity: | normal | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
Hi walnut,
This plugin still not working with XMLRPC, got the error message like "'Environment' object has no attribute 'childtickets' while executing ticket.update()", but I think you have fixed this issue in 0.12 branch (#8643), so would you please merge your changes to branch 0.11?
Many thanks and happy new year!
Attachments (0)
Change History (6)
comment:1 Changed 18 months ago by anonymous
comment:2 follow-up: ↓ 6 Changed 18 months ago by walnut
- Status changed from new to assigned
I have made a change and committed in [11112], please rebuild, install and test this version of the plugin. The functionality is still somewhat different to the 0.12 version as the older trac does not have any support for caching (more specifically, it is missing the @caching decorator!)
I ran some basic tests myself and my feeling is that it depends upon how you are using the XMLRPC plugin as to whether this plugin will work correctly or not. For example, how should I 'resolve' a ticket with XMLRPM plugin (could you give me a script example - I could then test myself in future!)
Looking forward to seeing whether it works!
Regards
Mark
comment:3 follow-up: ↓ 5 Changed 18 months ago by walnut
Just been doing some further testing and the validation of tickets will not work correctly as this is triggered in the ITicketManipulator interface which XMLRPM doesn't seem to be calling .....
:-(
comment:4 Changed 18 months ago by walnut
sorry XMLRPC ...!
comment:5 in reply to: ↑ 3 Changed 18 months ago by osimons
Replying to walnut:
Just been doing some further testing and the validation of tickets will not work correctly as this is triggered in the ITicketManipulator interface which XMLRPM doesn't seem to be calling .....
:-(
It does - but such handling requires 'action' to be passed in attributes. See source:/xmlrpcplugin/trunk/tracrpc/ticket.py -> def update(), currently line 180 (or rather the else from line 216).
BTW, the RPC plugin also has functional tests, so you can see how the calls are made. For tickets, see source:/xmlrpcplugin/trunk/tracrpc/tests/ticket.py
comment:6 in reply to: ↑ 2 Changed 18 months ago by uray
- Resolution set to fixed
- Status changed from assigned to closed
Replying to walnut:
I have made a change and committed in [11112], please rebuild, install and test this version of the plugin. The functionality is still somewhat different to the 0.12 version as the older trac does not have any support for caching (more specifically, it is missing the @caching decorator!)
I ran some basic tests myself and my feeling is that it depends upon how you are using the XMLRPC plugin as to whether this plugin will work correctly or not. For example, how should I 'resolve' a ticket with XMLRPM plugin (could you give me a script example - I could then test myself in future!)
Looking forward to seeing whether it works!
Regards
Mark
Just tested the new version, it works well with XMLRPC, no more errors, so I think this ticket can be closed.
For resolve a ticket with XMLRPC, here is the example:
import xmlrpclib server = xmlrpclib.ServerProxy("http://user:pass@localhost:8080/trunk/login/xmlrpc") ticket = server.ticket.get(1) server.ticket.update(1, 'My comment', { 'action': 'resolve', 'action_resolve_resolve_resolution': 'fixed', '_ts':ticket[3]['_ts'] }, True))
Thanks!


Hi
(...and Happy New Year!)
I did make the changes for 0.11 but then had to back them out again as there were problems with caching and Trac 0.11 does not implement a generic cachemanager (see #8643)
I will try and see if I can get a workaround in place for this ....
Regards
Mark