[open-ils-commits] r17957 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 24 13:56:35 EDT 2010


Author: miker
Date: 2010-09-24 13:56:31 -0400 (Fri, 24 Sep 2010)
New Revision: 17957

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
put the frozen (and also empty issuance or last-copy-removed) check back in as a conditional select if we found nothing mapped

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2010-09-24 17:45:49 UTC (rev 17956)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2010-09-24 17:56:31 UTC (rev 17957)
@@ -1060,6 +1060,28 @@
         } 
     });
 
+    if (!@$q_holds) { # none? maybe we don't have a map ... 
+        my $q_holds = $e->json_query({
+            select => {ahr => ['id', 'cut_in_line', 'request_time']},
+            from   => 'ahr',
+            order_by => [
+                {
+                    "class" => "ahr",
+                    "field" => "cut_in_line",
+                    "transform" => "coalesce",
+                    "params" => [ 0 ],
+                    "direction" => "desc"
+                },
+                { "class" => "ahr", "field" => "request_time" }
+            ],
+            where    => {
+                hold_type => $hold->hold_type, 
+                target    => $hold->target 
+           } 
+        });
+    }
+
+
     my $qpos = 1;
     for my $h (@$q_holds) {
         last if $h->{id} == $hold->id;



More information about the open-ils-commits mailing list