Search

Possible to use API to submit a ticket?

Subscribe to Possible to use API to submit a ticket? 11 post(s)

 
Luke Vizz

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?

 
Joshua Frappier

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!

 
Ben Strackany

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

 
Neil Thompson

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?

 
Eric Willis

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?

 
Neil Thompson

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
define (“UNFUDDLE_DOMAIN”, “test.unfuddle.com”);
// your project short name
define (“UNFUDDLE_PROJECTSHORTNAME”, “Website”);
// your unfuddle log in info username:password
define (“UNFUDDLE_AUTH”, “username:password”);

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

 
Neil Thompson

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

 
Ben Strackany

Heh, glad to hear it worked out! I haven’t been back to this thread in a while, as you can probably tell. :)

 
dannykellett

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,
Danny

 
bcbirkhauser

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?

 
pixeline

Thanks ben for your script, very helpful.

I have a micro account:

If i use https: i get
HTTP/1.1 403 Forbidden
Date: Thu, 03 Dec 2009 21:41:30 GMT
Server: Apache
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.1.2
Cache-Control: no-cache
Set-Cookie: _unfuddle_session=0648f37d43bd2323dcbd1406128b7e6e; domain=.unfuddle.com; path=/; expires=Thu, 03 Dec 2009 23:41:30 GMT; HttpOnly
Content-Length: 1
Status: 403
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=utf-8

If i use http: i get:

HTTP/1.1 500 Internal Server Error
Date: Thu, 03 Dec 2009 21:46:22 GMT
Server: Apache
X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.1.2
Cache-Control: no-cache
Set-Cookie: _unfuddle_session=dea7a1b7e6ff995b4a734b954790d20b; domain=.unfuddle.com; path=/; expires=Thu, 03 Dec 2009 23:46:22 GMT; HttpOnly
Content-Length: 1
Status: 500
Vary: Accept-Encoding,User-Agent
Connection: close
Content-Type: text/html; charset=utf-8

Maybe the sending script has to sit on a https domain ?