[open-ils-commits] r14113 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Sep 23 10:09:33 EDT 2009
Author: erickson
Date: 2009-09-23 10:09:31 -0400 (Wed, 23 Sep 2009)
New Revision: 14113
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
return any notes attached to the captured hold on checkin so the UI does not have to re-fetch them. some mild code cleanup/optimization
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-09-23 03:37:40 UTC (rev 14112)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-09-23 14:09:31 UTC (rev 14113)
@@ -2458,21 +2458,24 @@
$self->events([grep { $_->{textcode} eq 'ITEM_NOT_CATALOGED' } @{$self->events}]);
}
+ my $record = U->record_to_mvr($self->title) if($self->title and !$self->is_precat);
+ my $hold;
+ if($self->hold and !$self->hold->cancel_time) {
+ $hold = $self->hold;
+ $hold->notes($self->editor->search_action_hold_request_note({hold => $hold->id}));
+ }
+
for my $evt (@{$self->events}) {
- my $payload = {};
- $payload->{copy} = $U->unflesh_copy($self->copy);
- $payload->{record} = $U->record_to_mvr($self->title) if($self->title and !$self->is_precat);
- $payload->{circ} = $self->circ;
- $payload->{transit} = $self->transit;
+ my $payload = {};
+ $payload->{copy} = $U->unflesh_copy($self->copy);
+ $payload->{record} = $record,
+ $payload->{circ} = $self->circ;
+ $payload->{transit} = $self->transit;
$payload->{cancelled_hold_transit} = 1 if $self->cancelled_hold_transit;
-
- # $self->hold may or may not have been replaced with a
- # valid hold after processing a cancelled hold
- $payload->{hold} = $self->hold unless (not $self->hold or $self->hold->cancel_time);
-
- $evt->{payload} = $payload;
+ $payload->{hold} = $hold;
+ $evt->{payload} = $payload;
}
}
More information about the open-ils-commits
mailing list