Modify

Opened 3 years ago

Closed 3 years 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 3 years ago by anonymous

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

comment:2 follow-up: Changed 3 years 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: Changed 3 years 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 3 years ago by walnut

sorry XMLRPC ...!

comment:5 in reply to: ↑ 3 Changed 3 years 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 3 years 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!

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from walnut. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.