From 2b207931a2c7be98a3e25dfeede5a0db36c6080b Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 29 Jan 2014 17:42:15 -0500 Subject: [PATCH] LP#1053397 MR holds available formats; initial extraction Signed-off-by: Bill Erickson --- .../perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 02b729a073..b950d08630 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -790,6 +790,25 @@ sub load_place_hold { record => $mr->master_record })); } + + # see which formats are available for the selected records. + # fetches search_label, value for each ccvm linked to the + # mr holds format attribute, for every record within this MR. + $ctx->{metarecord_formats} = $e->json_query({ + select => {ccvm => ['id', 'value', 'search_label']}, + from => {mraf => { + cgf => { + fkey => 'attr', + field => 'value', + filter => {name => 'opac.metarecord.holds.format_attr'} + }, + ccvm => { + fkey => 'attr', + field => 'ctype' + } + }}, + where => {'+mraf' => {id => \@targets}} + }); }, T => sub { my $recs = $e->batch_retrieve_biblio_record_entry(\@targets, {substream => 1}); -- 2.11.0