Hello Wouter,


> -----Ursprüngliche Nachricht-----
> Von: Wouter Mignon [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 26. November 2003 13:22
> An: User questions and discussions about OTRS.
> Betreff: [otrs] total time units per agent
> 
> Hello,
> 
> I want to be able to check how many time units an agent spent 
> working on 
> tickets in a specific period. What is the best way to fetch this info?
> 
You have to perform a SQL-Query in a way like this :

SELECT time_accounting.create_time, time_accounting.time_unit,ticket.customer_id, 
ticket.tn, ticket.id 
FROM time_accounting,ticket 
WHERE(time_accounting.create_by='$agent_id') AND 
time_accounting.create_time>'$begin_date')
AND (time_accounting.create_time<'$end_date') AND (ticket.id=time_accounting.ticket_id)
ORDER BY ticket.customer_id, LEFT(time_accounting.create_time,10)

$agent_id -> agent_id
$begin_date -> from date
$end_date -> to date

Hope that helps.

greets
   Tomas


cimt ag

------------------------------------------------------------------------
Unter den Eichen 128 - 12203 Berlin

fon: +49.30.834098-0 fax: -22
mobil: +49.178.7270777
email: [EMAIL PROTECTED]
http://www.cimt-ag.de



> greets,
> Wouter
> 
_______________________________________________
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
Support oder Consulting für Ihr OTRS System?
=> http://www.otrs.de/

Reply via email to