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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Nov 1 14:37:41 EDT 2010


Author: miker
Date: 2010-11-01 14:37:36 -0400 (Mon, 01 Nov 2010)
New Revision: 18555

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
Log:
we should not restrict to the top org only, get all counts

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm	2010-11-01 18:27:14 UTC (rev 18554)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm	2010-11-01 18:37:36 UTC (rev 18555)
@@ -1721,16 +1721,9 @@
         $o_search
     )->gather(1);
 
-    my $top_org = defined($depth) ? 
-        $_storage->request(
-            'open-ils.cstore.json_query',
-            { from => [ 'actor.org_unit_ancestor_at_depth', $one_org->id, $depth ] }
-        )->gather(1)->{id} :
-        $one_org->id;
+    my $count_req = $_search->request('open-ils.search.biblio.record.copy_count' => $one_org->id => $bib);
+    my $staff_count_req = $_search->request('open-ils.search.biblio.record.copy_count.staff' => $one_org->id => $bib);
 
-    my $count_req = $_search->request('open-ils.search.biblio.record.copy_count' => $top_org => $bib);
-    my $staff_count_req = $_search->request('open-ils.search.biblio.record.copy_count.staff' => $top_org => $bib);
-
     my $orgs = $_storage->request(
         'open-ils.cstore.json_query.atomic',
         { from => [ 'actor.org_unit_descendants', defined($depth) ? ( $one_org->id, $depth ) :  ( $one_org->id ) ] }



More information about the open-ils-commits mailing list