[open-ils-commits] [GIT] Evergreen ILS branch rel_2_1 updated. b7c3db9deae29a376b00e44376e5f24d30a1fcb6
Evergreen Git
git at git.evergreen-ils.org
Tue Dec 6 09:52:17 EST 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_1 has been updated
via b7c3db9deae29a376b00e44376e5f24d30a1fcb6 (commit)
via d5c59feb5ebe33afc9e65e8e41e53e47b8f25c40 (commit)
via 5fd9350ab5ac9c2718bbd0d9aecabedc0f027857 (commit)
from 36978ac3dd74ffd44a73a290e6363ca6762af515 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b7c3db9deae29a376b00e44376e5f24d30a1fcb6
Author: Dan Wells <dbw2 at calvin.edu>
Date: Mon Dec 5 11:44:41 2011 -0500
Code comments and tweaks for lost processing
This commit is intended to do the following:
* Fix case where MISSING status is not retained for items
being sent 'home' (as it was in previous versions)
* Be more explicit about when we unset the LOST status and when
we do not in checkin_handle_lost()
* Prevent update of the copy in checkin_handle_lost() unless we
actually change the status
* Restore log messages for special handling of LOST/MISSING
checkins away from 'home'
* Provide additional code comments to clarify intended behavior
Note: Given the current restructure, MISSING item behavior is no
longer affected by 'lost_immediately_available' setting. That
seemed more bug than feature, and can be implemented later
(perhaps as a separate setting) if required.
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index 74fc2a2..797c094 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3041,11 +3041,17 @@ sub checkin_handle_circ {
my $stat = $U->copy_status($self->copy->status)->id;
if ($stat == OILS_COPY_STATUS_LOST) {
-
+ # we will now handle lost fines, but the copy will retain its 'lost'
+ # status if it needs to transit home unless lost_immediately_available
+ # is true
+ #
+ # if we decide to also delay fine handling until the item arrives home,
+ # we will need to call lost fine handling code both when checking items
+ # in and also when receiving transits
$self->checkin_handle_lost($circ_lib);
-
+ } elsif ($circ_lib != $self->circ_lib and $stat == OILS_COPY_STATUS_MISSING) {
+ $logger->info("circulator: not updating copy status on checkin because copy is missing");
} else {
-
$self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING));
$self->update_copy;
}
@@ -3102,12 +3108,25 @@ sub checkin_handle_lost {
$self->checkin_handle_lost_now_found_restore_od() if $restore_od && ! $self->void_overdues;
}
- my $immediately_available = $U->ou_ancestor_setting_value(
- $circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self->editor) || 0;
+ if ($circ_lib != $self->circ_lib) {
+ # if the item is not home, check to see if we want to retain the lost
+ # status at this point in the process
+ my $immediately_available = $U->ou_ancestor_setting_value($circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self->editor) || 0;
- $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING)) if ($immediately_available);
-
- $self->update_copy;
+ if ($immediately_available) {
+ # lost item status does not need to be retained, so give it a
+ # reshelving status as if it were a normal checkin
+ $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING));
+ $self->update_copy;
+ } else {
+ $logger->info("circulator: not updating copy status on checkin because copy is lost");
+ }
+ } else {
+ # lost item is home and processed, treat like a normal checkin from
+ # this point on
+ $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING));
+ $self->update_copy;
+ }
}
commit d5c59feb5ebe33afc9e65e8e41e53e47b8f25c40
Author: Jason Stephenson <jstephenson at mvlc.org>
Date: Tue Nov 29 09:22:29 2011 -0500
Check OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE in checkin_handle_lost.
Check the value of OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE before
changing the copy status in checkin_handle_lost. This makes the setting
actually do something.
Add a couple of blank lines to aid in readability.
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index 22aa22c..74fc2a2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3102,7 +3102,11 @@ sub checkin_handle_lost {
$self->checkin_handle_lost_now_found_restore_od() if $restore_od && ! $self->void_overdues;
}
- $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING));
+ my $immediately_available = $U->ou_ancestor_setting_value(
+ $circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self->editor) || 0;
+
+ $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING)) if ($immediately_available);
+
$self->update_copy;
}
commit 5fd9350ab5ac9c2718bbd0d9aecabedc0f027857
Author: Jason Stephenson <jstephenson at mvlc.org>
Date: Thu Nov 17 15:15:09 2011 -0500
Fix LP851000.
Remove about 14 lines from OpenILS/Application/Circ/Circulate.pm
in the checkin_handle_circ subroutine that check whether or not
the checkin happens at the copy's circ_lib and the value of the
circ.lost_immediately_available org unit setting.
This change causes the handle_lost subroutine to run regardless of
where the checkin takes place for a more consistent experience.
Whether or not billings are voided, overdues restored, etc. is still
determined by the copy's circ_lib.
Given how the hold targeter and transit code works, it does not appear
the the circ.lost_immediately_available setting could ever do what it
was intended to do. Given these changes to the code it is now unnecessary.
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index 3bd0638..22aa22c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3040,21 +3040,7 @@ sub checkin_handle_circ {
$self->copy->circ_lib->id : $self->copy->circ_lib;
my $stat = $U->copy_status($self->copy->status)->id;
- # immediately available keeps items lost or missing items from going home before being handled
- my $lost_immediately_available = $U->ou_ancestor_setting_value(
- $circ_lib, OILS_SETTING_LOST_IMMEDIATELY_AVAILABLE, $self->editor) || 0;
-
-
- if ( (!$lost_immediately_available) && ($circ_lib != $self->circ_lib) ) {
-
- if( ($stat == OILS_COPY_STATUS_LOST or $stat == OILS_COPY_STATUS_MISSING) ) {
- $logger->info("circulator: not updating copy status on checkin because copy is lost/missing");
- } else {
- $self->copy->status($U->copy_status(OILS_COPY_STATUS_RESHELVING));
- $self->update_copy;
- }
-
- } elsif ($stat == OILS_COPY_STATUS_LOST) {
+ if ($stat == OILS_COPY_STATUS_LOST) {
$self->checkin_handle_lost($circ_lib);
-----------------------------------------------------------------------
Summary of changes:
.../lib/OpenILS/Application/Circ/Circulate.pm | 49 ++++++++++++--------
1 files changed, 29 insertions(+), 20 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list