From: Bill Erickson Date: Thu, 24 Mar 2011 15:25:33 +0000 (-0400) Subject: no such thing as a metarecord-part hold (at least not now). simplify parts retrieval X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aa738ee10ab341b1fdb1ddbf73c255403241004b;p=evergreen%2Fequinox.git no such thing as a metarecord-part hold (at least not now). simplify parts retrieval --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index b19c376cb0..f459f1ce9e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -2359,10 +2359,9 @@ sub fetch_slim_record { __PACKAGE__->register_method( method => 'rec_hold_parts', - api_name => 'open-ils.search.metabib.record_hold_parts', + api_name => 'open-ils.search.biblio.record_hold_parts', signature => q/ - Returns a list of {label :foo, id : bar} objects for viable monograph parts - for a given record or metarecord. + Returns a list of {label :foo, id : bar} objects for viable monograph parts for a given record / ); @@ -2381,29 +2380,17 @@ sub rec_hold_parts { id => { in => { select => {'acpm' => ['part']}, - where => {'+acp' => { 'deleted' => 'f'}}, + from => {acpm => {acp => {join => {acn => {join => 'bre'}}}}}, + where => { + '+acp' => {'deleted' => 'f'}, + '+bre' => {id => $rec} + }, distinct => 1, } } } }; - if($rec) { - $query->{where}->{id}->{in}->{from} = {acpm => {acp => {join => {acn => {join => 'bre'}}}}}; - $query->{where}->{id}->{in}->{where}->{'+bre'} = {id => $rec} - - } else { - - $query->{where}->{id}->{in}->{from} = - {acpm => {acp => {join => {acn => {join => {bre => {join => { - mmrsm => { - field => 'source', - fkey => 'id', - filter => {metarecord => $mrec} - } - }}}}}}}}; # weee - } - if(defined $pickup_lib) { my $hard_boundary = $U->ou_ancestor_setting_value($pickup_lib, OILS_SETTING_HOLD_HARD_BOUNDARY); if($hard_boundary) {