[Rt-devel] Modify Most due incidents

Juan Ramón Alfageme Mata JRamon.Alfageme at alhambra-eidos.com
Wed Apr 6 11:56:09 EDT 2005


I need to modify "Most due incidents" list, by default it takes tickets ordered by id, SQL sentence to get only ids would be:

  SELECT id 
  FROM Tickets 
  WHERE 
    Queue = (SELECT id 
             FROM Queues 
             WHERE Name = 'Incidents')
    AND Status in ('new','open','stalled');

I need limit show tickets in the following way:

  SELECT id 
  FROM Tickets 
  WHERE 
    Queue = (SELECT id 
             FROM Queues 
             WHERE Name = 'Incidents')
    AND Status in ('new','open','stalled') 
    AND Due < "2005-04-05 00:00:00";


I can order by Due, but I need show only tickets that match above criteria. How can I do that?

 	
Juan Ramón Alfageme Mata. Soporte ICM +34 91 787 23 00




More information about the Rt-devel mailing list