Per user request
Hi Cyberde,
Now that my install is working, I've been playing around a bit with the method but can't find a specific method to get specific user ticket. For example, I would like to have all the ticket for user X. The only option I see presently is to use the listByStatus method and than filter the data for my user (email). However, this won't be good for performance since each time it will get the whole list of ticket in the database and not only those ticket for the user.
Is my understanding correct? Is there another to be more efficicient ot get the same result? Will user method be added to the service or is it hard to add one?
My site is more toward the user (with is email) and will use open ticket method, a list of ticket for user method and the othermethod based on ticket number. I'm only missing the middle one.
Hope you can help!
UPDATE:
For my point above, I was able to work-around by accessing the database directly but I have a new issue and a new question.
1. An additional question, is there any plan for attachment support?
2. I've been successful in using function ticketOpen and getStatus but got error message when using getMessages or getNotes
Fatal error: Uncaught SoapFault exception: Internal Server Error in /home/bennyb5/public_html/get_status.php Stack trace: #0 : SoapClient->__doRequest('<?xml version="...', 'http://www.benn...', 'http://www.benn...', 1, 0) #1 /home/bennyb5/public_html/get_status.php(17): SoapClient->__call('ostTicket.getMe...', Array) #2 {main} thrown in /home/bennyb5/public_html/get_status.php on line 17
My code is //Connect to webservice
include "includes/ost_ws_connect.php";
// Set up the parameters
$args = array(
'username' => $ost_ws_user,
'password' => $ost_ws_pass,
'ticketId' => 431384);
// Send the request and receive the status (eg Open, Closed)
try {
$result = $osticket->__call('ostTicket.getMessages',$args);
}
catch (SoapFault $e) {
throw $e;
}
print_r($result); where line 17 is the call to getMessages.
I'm a bit stuck since the same code but with getStatus function is working great. What could be the problem?
I'm on OsTicket 1.7