Author: spadkins
Date: Wed Nov  7 11:56:24 2007
New Revision: 10189

Modified:
   p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm

Log:
fix bug in status counts by reseting all to 0 before updating their status

Modified: p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm
==============================================================================
--- p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm    (original)
+++ p5ee/trunk/App-WorkQueue/lib/App/WorkQueue/Repository.pm    Wed Nov  7 
11:56:24 2007
@@ -603,6 +603,9 @@
         }
     }
     my $rows = $db->get_rows($self->{table}, $params, [ $key_attrib, 
$count_expr ], { group_by => [ $key_attrib ] });
+    foreach my $key (keys(%$counts)) {
+        $counts->{$key} = 0;
+    }
     foreach my $row (@$rows) {
         $counts->{$row->[0]} = $row->[1];
     }

Reply via email to