[open-ils-commits] r17658 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 14 15:04:28 EDT 2010
Author: erickson
Date: 2010-09-14 15:04:24 -0400 (Tue, 14 Sep 2010)
New Revision: 17658
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
additional issuance holds supporting code; in this case, hold_to_mvr func which is used by the uber hold details method; commit also includes a small speed tweak for fetching details for copy holds (1 less cstore call)
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-09-14 19:01:28 UTC (rev 17657)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-09-14 19:04:24 UTC (rev 17658)
@@ -2463,6 +2463,7 @@
my $tid;
my $copy;
my $volume;
+ my $issuance;
if( $hold->hold_type eq OILS_HOLD_TYPE_METARECORD ) {
my $mr = $e->retrieve_metabib_metarecord($hold->target)
@@ -2477,11 +2478,21 @@
or return $e->event;
$tid = $volume->record;
+ } elsif( $hold->hold_type eq OILS_HOLD_TYPE_ISSUANCE ) {
+ $issuance = $e->retrieve_serial_issuance([
+ $hold->target,
+ {flesh => 1, flesh_fields => {siss => [ qw/subscription/ ]}}
+ ]) or return $e->event;
+
+ $tid = $issuance->subscription->record_entry;
+
} elsif( $hold->hold_type eq OILS_HOLD_TYPE_COPY ) {
- $copy = $e->retrieve_asset_copy($hold->target)
- or return $e->event;
- $volume = $e->retrieve_asset_call_number($copy->call_number)
- or return $e->event;
+ $copy = $e->retrieve_asset_copy([
+ $hold->target,
+ {flesh => 1, flesh_fields => {acp => ['call_number']}}
+ ]) or return $e->event;
+
+ $volume = $copy->call_number;
$tid = $volume->record;
}
@@ -2496,7 +2507,7 @@
# TODO return metarcord mvr for M holds
my $title = $e->retrieve_biblio_record_entry($tid);
- return ( $U->record_to_mvr($title), $volume, $copy );
+ return ( $U->record_to_mvr($title), $volume, $copy, $issuance );
}
More information about the open-ils-commits
mailing list