[open-ils-commits] r12147 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Feb 10 23:33:18 EST 2009
Author: erickson
Date: 2009-02-10 23:33:16 -0500 (Tue, 10 Feb 2009)
New Revision: 12147
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
plugged in checkout history bucket population to checkout process
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-02-11 04:15:19 UTC (rev 12146)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-02-11 04:33:16 UTC (rev 12147)
@@ -197,6 +197,7 @@
# overrides have been performed. Go ahead and re-override.
$circulator->override(1) if $circulator->request_precat;
$circulator->do_permit();
+ $circulator->is_checkout(1);
unless( $circulator->bail_out ) {
$circulator->events([]);
$circulator->do_checkout();
@@ -208,6 +209,7 @@
return $data;
} elsif( $api =~ /checkout/ ) {
+ $circulator->is_checkout(1);
$circulator->do_checkout();
} elsif( $api =~ /checkin/ ) {
@@ -244,6 +246,7 @@
$circulator->do_hold_notify($circulator->notify_hold)
if $circulator->notify_hold;
$circulator->retarget_holds if $circulator->retarget;
+ $circulator->append_reading_list;
}
}
@@ -339,6 +342,7 @@
volume
title
is_renewal
+ is_checkout
is_noncat
is_precat
request_precat
@@ -1133,7 +1137,6 @@
}
if( $self->is_precat ) {
- #$self->script_runner->insert("environment.isPrecat", 1, 1)
$self->make_precat_copy;
return if $self->bail_out;
@@ -2257,7 +2260,6 @@
sub do_renew {
my $self = shift;
$self->log_me("do_renew()");
- $self->is_renewal(1);
# Make sure there is an open circ to renew that is not
# marked as LOST, CLAIMSRETURNED, or LONGOVERDUE
@@ -2361,9 +2363,21 @@
sub append_reading_list {
my $self = shift;
- my $e = $self->editor;
- return undef unless $self->patron and $self->title;
+ return undef unless
+ $self->is_checkout and
+ $self->patron and
+ $self->title and
+ !$self->is_precat and
+ !$self->is_noncat;
+
+ my $e = new_editor(xact => 1, requestor => $self->editor->requestor);
+
+ my $setting = $e->search_actor_user_setting(
+ {usr => $self->patron->id,, name => 'circ.keep_checkout_history_list'})->[0];
+
+ return undef unless $setting and $setting->value;
+
my $bkt = $e->search_container_biblio_record_entry_bucket(
{owner => $self->patron->id, btype => 'reading_list'})->[0];
@@ -2393,6 +2407,8 @@
$e->create_container_biblio_record_entry_bucket_item($item)
or return $e->die_event;
+ $e->commit;
+
return undef;
}
More information about the open-ils-commits
mailing list