[otrs] ticket_history table understanding

32 views
Skip to first unread message

Darshak Modi

unread,
Feb 27, 2014, 2:23:46 AM2/27/14
to User questions and discussions about OTRS.
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.


Marco Vannini

unread,
Feb 27, 2014, 4:06:06 AM2/27/14
to User questions and discussions about OTRS.
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.


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

Gerald Young

unread,
Feb 27, 2014, 4:17:41 AM2/27/14
to User questions and discussions about OTRS.
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.

Darshak Modi

unread,
Feb 27, 2014, 4:20:02 AM2/27/14
to ot...@otrs.org
trough search tool , I can not automate. so need some query.

Yes I am trying , will post the query and result.


Reply all
Reply to author
Forward
0 new messages