You might browse the ticket_history_type table: (AddNote is 15 in my table) 
or you can  WHERE history_type_id = (select id from ticket_history_type WHERE name="AddNote") or equivalent. 

On Thu, Jun 30, 2011 at 5:21 AM, Alexandru Cioropina <alexandru.cioropina@conectys.com> wrote:

Hey… First of all, I’m new here, so I apologize in advance if my question has already an answer.

 

So, basically, here’s the fact: the company I work in would like a report to reveal all the notes that were created regarding a ticket. I couldn’t find anything like it in OTRS, so I went to another reporting tool and I ended up with this query:

 

SELECT

    ticket.tn, COUNT(ticket_history.history_type_id)

    AS '# of Notes'

  FROM

    ticket_history

    LEFT JOIN ticket ON (ticket_history.ticket_id = ticket.id)

  WHERE

    ticket_history.history_type_id = 15 AND ticket_history.create_time BETWEEN startDate AND endDate

  GROUP BY

    ticket.id;

 

It’s part of a procedure, so that’s why I have a startDate and an endDate. My question is if anyone of you guys know what history_type_id’s are used when adding a note…

 

Thank you very much in advance.


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