bloodhound-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Abbate <abbat...@gmail.com>
Subject xml-rpc ticket.delete ResourceNotFound: Ticket n does not exist
Date Tue, 18 Feb 2014 16:10:20 GMT
Hello All

I greatly appreciate any help, and kudos for an extremely useful project.

(1) Short version:

I would like to submit and update tickets remotely using xml-rpc. I am 
using 0.7 and the suggested xml-rpc plugin version.

I can use curl or chrome-postman and get sensible answers to calls such 
as ticket.getTicketFields and wiki.getPage.I can also successfully use 
ticket.create.

However when I use ticket.update to put additional info into the ticket 
I get the error that the ticket does not exist.
The simpler ticket.delete results in the same error. Other calls such as 
ticket.getActions that need the id also fail.

Then I tried trac-admin and also can not delete:
Trac 
[/home/family/bloodhoundsvn/bloodhound/installer/bloodhound/environments/main]> 
ticket remove 2
ResourceNotFound: Ticket 2 does not exist.


(2) Long version:

I am by no means a trac/bloodhound/python expert, and do not fully 
understand how bloodhound provides the multi product functionality on 
top of trac.

The isolated multiproduct functionality is important for my application, 
so I have not gone back to a trac only install to test this.

ticket.create is not quite enough for my needs, I also want to assign 
the ticket, and add successive comments and attachments.

I did read discussions on the list about IDs and product separation etc, 
so hopefully I have missed something obvious, eg:
Subject    Re: Error: Invalid ticket number ... WAS: [Apache Bloodhound] 
#671: Product edits always reported as anonymous Date    Fri, 27 Sep 
2013 07:42:25 GMT

- Using:

4038685 Jan 22 15:55 /home/family/Downloads/apache-bloodhound-0.7.tar.gz
I also ran from the svn co:
svn co https://svn.apache.org/repos/asf/bloodhound/trunk bloodhound
TRAC_VERSION 1.0.1
Followed README.rst, using SQLite.

http://localhost:8000/main/products/%40/rpc#rpc.ticket.version
Remote Procedure Call (RPC), Installed API version : 1.4.1dev

This is a fresh install. I created 3 tickets manually from the web UI.
User mark has admin permissions, and XML_RPC.


- Example Call:

<?xml version="1.0"?>
<methodCall>
<methodName>ticket.delete</methodName>
<params>
     <params>
         <param>
             <value>
                 <int>2</int>
             </value>
         </param>
     </params>
</params>
</methodCall>

<?xml version='1.0'?>
<methodResponse>
     <fault>
         <value>
             <struct>
                 <member>
                     <name>faultCode</name>
                     <value>
                         <int>404</int>
                     </value>
                 </member>
                 <member>
                     <name>faultString</name>
                     <value>
                         <string>Ticket 2 does not exist.</string>
                     </value>
                 </member>
             </struct>
         </value>
     </fault>
</methodResponse>

2014-02-18 09:27:38,431 Trac[main] DEBUG: Dispatching 
<ProductRequestWithSession "POST '/login/xmlrpc'">
2014-02-18 09:27:38,433 Trac[web_ui] DEBUG: LoginModule._remote_user: 
Authentication attempted for 'None'
2014-02-18 09:27:38,433 Trac[web_ui] DEBUG: LoginModule.authenticate: 
Set 'REMOTE_USER' = 'None'
2014-02-18 09:27:38,434 Trac[session] DEBUG: Retrieving session for ID 
u'mark'
2014-02-18 09:27:38,435 Trac[main] DEBUG: Negotiated locale: None -> en_US
2014-02-18 09:27:38,436 Trac[api] WARNING: Unable to find repository 
'(default)' for synchronization
2014-02-18 09:27:38,436 Trac[web_ui] DEBUG: RPC incoming request of 
content type 'application/xml:' dispatched to 
<tracrpc.xml_rpc.XmlRpcProtocol object at 0x7f9020acd050>
2014-02-18 09:27:38,437 Trac[web_ui] DEBUG: RPC(XML-RPC) call by 'mark'
2014-02-18 09:27:38,437 Trac[xml_rpc] DEBUG: RPC(xml) call by 'mark', 
method 'ticket.delete' with args: (2,)
2014-02-18 09:27:38,438 Trac[web_ui] DEBUG: RPC(XML-RPC) call by 'mark' 
ticket.delete
2014-02-18 09:27:38,440 Trac[web_ui] ERROR: RPC(XML-RPC) Error
Traceback (most recent call last):
   File "build/bdist.linux-x86_64/egg/tracrpc/web_ui.py", line 158, in 
_rpc_process
     result = (XMLRPCSystem(self.env).get_method(method_name)(req, args))[0]
   File "build/bdist.linux-x86_64/egg/tracrpc/api.py", line 197, in __call__
     result = self.callable(req, *args)
   File "build/bdist.linux-x86_64/egg/tracrpc/ticket.py", line 270, in 
delete
     t = model.Ticket(self.env, id)
   File 
"/home/family/bloodhoundsvn/bloodhound/trac/trac/ticket/model.py", line 
82, in __init__
     self._fetch_ticket(tkt_id)
   File 
"/home/family/bloodhoundsvn/bloodhound/trac/trac/ticket/model.py", line 
121, in _fetch_ticket
     id=tkt_id), _("Invalid ticket number"))
ResourceNotFound: Ticket 2 does not exist.

thanks & best
Mark Abbate

Mime
View raw message