... and this last piece of sql too
authorivan <ivan>
Mon, 6 Dec 2004 14:15:34 +0000 (14:15 +0000)
committerivan <ivan>
Mon, 6 Dec 2004 14:15:34 +0000 (14:15 +0000)
FS/FS/TicketSystem/RT_External.pm

index 26420de..3bb1991 100644 (file)
@@ -50,7 +50,8 @@ sub num_customer_tickets {
   }
 
   my $sql = "
-    select count(*) from tickets 
+    select count(*) from tickets
+                    join links on ( tickets.id = links.localbase )
        where ( status = 'new' or status = 'open' or status = 'stalled' )
          and target = 'freeside://freeside/cust_main/$custnum'
          $priority_sql