Ticket #5527 (assigned enhancement)

Opened 3 years ago

Last modified 2 years ago

Include RPC handler to retrieve timed events managed by Timeline module

Reported by: olemis Assigned to: olemis (accepted)
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords: timeline, events, filters
Cc: Trac Release: 0.11

Description

TracGViz plugin includes an some XML-RPC handlers. TimelineRPC class's been included since version 1.3.3 (can't provide a link to browse the source code due to the fact that my SVN client is failing and I can't (commit | check) out anything ... sorry :( ).

It returns all timed events offered by instances of ITimelineEventProvider.

Please see below a code snippet illustrating public methods :

class TimelineRPC(Component):
    r""" An interface to Trac's timeline module.
    """
    implements(IXMLRPCHandler)
    sources = ExtensionPoint(ITimelineEventProvider)

    def __init__(self):
        self._event_data = TimelineModule(self.env)._event_data

    # IXMLRPCHandler methods
    def xmlrpc_namespace(self):
        return 'timeline'

    def xmlrpc_methods(self):
        yield ('TIMELINE_VIEW',
                ((list, xmlrpclib.DateTime, xmlrpclib.DateTime, list),
                 (list, xmlrpclib.DateTime, xmlrpclib.DateTime),
                 (list, xmlrpclib.DateTime),
                 (list, )),
                 self.getEvents)
        yield ('TIMELINE_VIEW', ((list,),), self.getEventFilters)

There are still a few open issues and further methods may be needed (e.g. to create, update, delete reports). Besides in order to retrieve all events related to ticket changes (e.g. attachments) timeline.ticket_show_details option in trac.ini needs to be set to true.

It is possible to move it onto XmlRpcPlugin. Feel free to do it !

PS: I tested it using 0.11, that's why I specify that value in Trac Release field . Hope you don't mind.

Attachments

Change History

07/27/09 15:28:09 changed by osimons

Thanks - a very useful set of methods! Haven't had time to look at it yet though, and first I have a few things I want to redo on the internals before I start adding new methods (specifically #5437). I'll get onto extending methods during August most likely. Stay tuned :-)

(in reply to: ↑ description ) 07/28/09 15:27:41 changed by anonymous

Replying to olemis:

TracGViz plugin includes an some XML-RPC handlers. TimelineRPC class's been included since version 1.3.3 (can't provide a link to browse the source code due to the fact that my SVN client is failing and I can't (commit | check) out anything ... sorry :( ).

BTW newer versions may include further features and bug fixes, so it's better to download the latest version.

12/22/09 16:19:32 changed by olemis

  • owner changed from osimons to olemis.
  • status changed from new to assigned.

Add/Change #5527 (Include RPC handler to retrieve timed events managed by Timeline module)




Change Properties
Action