bloodhound-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Abbate <abbat...@gmail.com>
Subject Re: xmlrpc ticket.query or report.execute complex query
Date Thu, 20 Mar 2014 17:59:13 GMT
Thanks Ryan!

Turns out I was using Postman in Chrome for my quick tests. I did try 
escaping the & but no luck.

But, I did not try it in java. Of course, I just tried it and it works.

I appreciate the help.
Mark


On 03/20/2014 01:45 PM, Ryan Ollos wrote:
> On Thu, Mar 20, 2014 at 10:17 AM, Mark Abbate <abbatemp@gmail.com 
> <mailto:abbatemp@gmail.com>> wrote:
>
>     Hi All
>
>     I would like to query for tickets over xmlrpc, but the query needs
>     to have multiple parts.
>
>     The ticket.query works with one part. It wasn't clear to me if
>     ticket.query supports multiple parts using the trac query language
>     syntax.
>
>     I tried
>     <param><string>owner=mabbate&product=mercer</string></param>
>
>     but I get this:
>     ProtocolException: ProtocolException details : <Fault -32700:
>     u'not well-formed (invalid token): line 4, column 38'>
>
>     It does look like I can create and then execute a report on the fly.
>
>     Can ticket.query handle multiple parts? If not, do I need to
>     create and execute a report, or are there other ways to make
>     complex queries.
>
>     thanks!
>     Mark Abbate
>
>
> The following works for me, so I think XmlRpcPlugin supports multiple 
> parameters in the Query.
>
> I guess maybe you need to escape the "&" in the XML?
>
> #!/usr/bin/env python
> import xmlrpclib
>
> if __name__ == '__main__':
>     server = xmlrpclib.ServerProxy("http://trac-hacks.org/xmlrpc")
>
>     multicall = xmlrpclib.MultiCall(server)
>     count = 0
>     for ticket in 
> server.ticket.query("owner=rjollos&component=PlantUmlMacro&status!=closed"):
>         multicall.ticket.get(ticket)
>         count += 1
>     print map(str, multicall())
>     print "Queried returned ", count, " tickets."
>
>
>


Mime
View raw message