AGE was giving strange results, switched to simple addition
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Aug 2007 00:34:00 +0000 (00:34 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 21 Aug 2007 00:34:00 +0000 (00:34 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@7708 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm

index 2de972d..4d7a79e 100644 (file)
@@ -183,7 +183,7 @@ sub nearest_hold {
        my $pl = shift;
        my $cp = shift;
        my $limit = int(shift()) || 10;
-       my $age = shift() || '0 seconds';
+       my $age = shift() || '0';
 
        my $age_where = '';
        if ($age) {
@@ -196,7 +196,7 @@ sub nearest_hold {
                        JOIN actor.org_unit_proximity p ON (p.from_org = h.pickup_lib)
                  WHERE hm.target_copy = ?
                        AND p.to_org = ?
-                       AND AGE(h.request_time) > ?
+                       AND h.request_time + ? < NOW()
                        AND h.capture_time IS NULL
                        AND h.cancel_time IS NULL
                ORDER BY