just get the first "nearest" hold
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Jul 2005 22:14:36 +0000 (22:14 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Jul 2005 22:14:36 +0000 (22:14 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1324 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 72049ba..97f2557 100644 (file)
@@ -48,6 +48,7 @@ sub nearest_hold {
                        AND hm.target_copy = ?
                        AND h.capture_time IS NULL
                ORDER BY h.pickup_lib - (SELECT home_ou FROM actor.usr a WHERE a.id = h.usr), h.request_time
+               LIMIT 1
        SQL
        return $id;
 }