[open-ils-commits] r18556 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Nov 1 14:38:39 EDT 2010


Author: miker
Date: 2010-11-01 14:38:34 -0400 (Mon, 01 Nov 2010)
New Revision: 18556

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

Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm	2010-11-01 18:37:36 UTC (rev 18555)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/SuperCat.pm	2010-11-01 18:38:34 UTC (rev 18556)
@@ -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