
Hello, I am trying to find all open tickets available in a specific queue with : my @TicketIDs = $TicketObject->TicketSearch( Result => 'ARRAY', States => 'open', QueueIDs => 15, ); This call outputs an empty array. In Ticket.pm, the function exits in line 2355. I think the problem come from the fact that there is no UserID defined from this search. If I add an UserID, the search look in all the queues. How can I restrict to this specific queue ? Regards. Eric Boudrand

Hi Eric, Eric Boudrand schrieb:
Hello,
I am trying to find all open tickets available in a specific queue with :
my @TicketIDs = $TicketObject->TicketSearch( Result => 'ARRAY', States => 'open', QueueIDs => 15, );
This call outputs an empty array. In Ticket.pm, the function exits in line 2355. I think the problem come from the fact that there is no UserID defined from this search. If I add an UserID, the search look in all the queues. How can I restrict to this specific queue ?
Sounds like you didn't regard the API-documentation http://dev.otrs.org/2.0/Kernel/System/Ticket.html#item_ticketsearch There is really no definite explanation there how to use the function, but I think it will help you.
Regards.
Eric Boudrand
Bye, Alex

Hi Alexander,
Sounds like you didn't regard the API-documentation http://dev.otrs.org/2.0/Kernel/System/Ticket.html#item_ticketsearch There is really no definite explanation there how to use the function, but I think it will help you.
I have (maybe partially) read http://dev.otrs.org/cvs/Kernel/System/Ticket.html#item_ticketsearch I fixed my issue. I used : my @TicketIDs = $TicketObject->TicketSearch( Result => 'ARRAY'|| 'HASH', UserID => 1, QueueID => 15, States => ['new','open'], ); QueueID must be used for searching in ONE queue. QueueIDs must be used for SEVERAL queues. For one state, I suppose I need to use State instead of States. Regards. Eric

my @TicketIDs = $TicketObject->TicketSearch( Result => 'ARRAY'|| 'HASH', UserID => 1, QueueID => 15, States => ['new','open'], );
Just an update to the previous lines : my @TicketIDs = $TicketObject->TicketSearch( Result => 'ARRAY', UserID => 1, Queues => ['Spam'], States => ['new','open'], ); It works better Eric
participants (2)
-
Alexander Scholler
-
Eric Boudrand