Something like:

SELECT th.name, th.ticket_id, max(th.create_time) FROM `ticket_history` th
left join ticket_history_type tht on th.history_type_id = tht.id where
tht.name = "StateUpdate" and (th.name like "%\%\%new\%\%" OR th.name like
"%\%\%pending %\%\%") group by th.ticket_id

beyond that, you'll probably want to start by understanding SQL queries,
present what you tried to do (optionally, show where you got that
information from to try it) and then present error messages or reasons that
the thing you tried to do on your own doesn't comply with the result you
desired. Or hire someone.


On Thu, Feb 27, 2014 at 4:06 AM, Marco Vannini <marco.vann...@gmail.com>wrote:

> why not using search tool inside otrs (
> http://otrs/otrs/index.pl?Action=AgentTicketSearch)
> then, if you make an export to csv you can do what you want.
>
>
> 2014-02-27 8:23 GMT+01:00 Darshak Modi <darshak.m...@elitecore.com>:
>
>>  Hi All,
>>
>> I can see multiple ticket state in the table. I want to find last state,
>> for some tickets 2 states at same time.
>> My goal is to find Open/Pending/New ticket on that day.
>>
>> Say tickets till 25th.
>>
>>
>>
>> ---------------------------------------------------------------------
>> OTRS mailing list: otrs - Webpage: http://otrs.org/
>> Archive: http://lists.otrs.org/pipermail/otrs
>> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>>
>
>
> ---------------------------------------------------------------------
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Reply via email to