From: Lebbeous Fogle-Weekley Date: Wed, 22 Feb 2012 23:25:03 +0000 (-0500) Subject: little more. lots more tomorrow X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c27e65c9c2d591edbaed22e5789325a922c1af16;p=evergreen%2Fequinox.git little more. lots more tomorrow Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 5260a76f9c..c19811078b 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -4352,7 +4352,18 @@ SELECT usr, - + + + + + + + + + + + + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm index 7acc52dc99..8b99746df5 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm @@ -662,6 +662,51 @@ q/A hash of optional arguments. Valid keys and their meanings: } ); +# XXX give a less confusing name, as this addresses what +# scoped_bib_holdings_summary() does, only more correctly. Maybe use api_level +# to offer the old and the new functionality side by side, if not replacing +# the old function altogether + +sub scoped_holdings_tree_for_bib { + my ($self, $client, $bib, $opts) = @_; + + # XXX trying to implement the first method defined in my notes (the pencil page) + + # TODO $opts->{org_unit} ||= top_of_org_tree; + $opts->{depth} ||= 0; + $opts->{limit} ||= 10; + $opts->{offset} ||= 0; + + my $e = new_editor; + + my $rows = $e->json_query({ + select => { + sasum => [qw/summary_type id generated_coverage/], + sdist => [qw/holding_lib/], + }, + from => { + sasum => { + sdist => { + join => { ssub => { } } + } + } + }, + where => { + "+sdist" => { + holding_lib => $U->get_org_descendants( + int($opts->{org_unit}), int($opts->{depth}) + ) + }, + "+ssub" => {record_entry => int($bib)} + }, + limit => int($opts->{limit}), + offset => int($opts->{offset}) + }) or return $e->die_event; + + + $e->disconnect; + +} ########################################################################## # unit methods