Possible to use API to submit a ticket?
|
|
I am using unfuddle to manage an order management console I’m writing. In the application, there is a link to a feedback form. I’d like to make this feedback form automatically submit a ticked to unfuddle. Is this possible with the API? If not, is there some way to hack it? |
|
|
Luke, There sure is a way to do this. Check out the code that one of our customers has submitted to the community recently: http://unfuddle.com/community/forums/1/topics/121 I think that will do exactly what you are looking for! |
|
|
I also made a PHP page letting users submit tickets into Unfuddle w/o having to log in. Hope it helps. http://www.developmentnow.com/blog/Unfuddle+Ticket+Submission+Form.aspx |
|
|
Ben, Tried your script and got the following error: Fatal error: Uncaught exception ‘Exception’ with message ‘String could not be parsed as XML’ in /home1/respont6/public_html/submitticket.php:354 Stack trace: #0 /home1/respont6/public_html/submitticket.php(354): SimpleXMLElement->__construct(’ ’) #1 /home1/respont6/public_html/submitticket.php(57): get_project_details(NULL) #2 {main} thrown in /home1/respont6/public_html/submitticket.php on line 354 Do I need something installed on my server? |
|
|
Neil, What does your XML string look like? “String could not be parsed as XML” usually means an invalid XML packet. You don’t have to install SimpleXML as far as I know (and SimpleXML is what’s crashing, so it seems to be there). Can you paste your XML string here? |
|
|
Hi Eric Not sure I didn’t actually submit any XML. I just changed the details at the beginning of the script as follows: /* CHANGE THE BELOW */ // your unfuddle domain and went to http://www.testt.com/submitticket.php and it went bang! If I comment out line 354 ( //$xml = new SimpleXMLElement($output);) I do see the submit page. If I then submit a ticket I get the following message: “Your call to Unfuddle returned an unexpected HTTP status of:” Any ideas? Thanks |
|
|
PROBLEM SOLVED! The code as it stands will only work for accounts that have https access – I am using a micro account. To get it to work I simply replaced all https with http and it started to work. Thanks |
|
|
Heh, glad to hear it worked out! I haven’t been back to this thread in a while, as you can probably tell. :) |
|
|
Hi all, Thanks for the code. I too am getting this error and I have changed alll the https for http but am still getting the same error. Any ideas please? Thank you for your time, |
|
|
i’m getting the same error. It creates the tickets but i’m not getting a response back with the location and the ticket id. just says Your call to Unfuddle returned an unexpected HTTP status of: any thoughts? |
|
|
Thanks ben for your script, very helpful. I have a micro account: If i use https: i get HTTP/1.1 500 Internal Server Error Maybe the sending script has to sit on a https domain ? |
