[open-ils-commits] [GIT] Evergreen ILS branch master updated. 27e32d09248a684e6291dd0aca5af4408271a352

Evergreen Git git at git.evergreen-ils.org
Tue Dec 6 09:48:16 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, master has been updated
       via  27e32d09248a684e6291dd0aca5af4408271a352 (commit)
       via  acc0939f9879b02d3f55321eb8efccc4a35e9fad (commit)
       via  787c445239a4457761e8ce52ecb8a136e1e2a892 (commit)
      from  d71b923ea0f7d16b19bb7e98176609726867b98a (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 27e32d09248a684e6291dd0aca5af4408271a352
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 c00d662..50ef6d6 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3297,11 +3297,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;
     }
@@ -3360,12 +3366,25 @@ sub checkin_handle_lost {
         $self->checkin_handle_lost_now_found_restore_od($circ_lib) 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 acc0939f9879b02d3f55321eb8efccc4a35e9fad
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 e47d701..c00d662 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3360,7 +3360,11 @@ sub checkin_handle_lost {
         $self->checkin_handle_lost_now_found_restore_od($circ_lib) 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 787c445239a4457761e8ce52ecb8a136e1e2a892
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 2b99396..e47d701 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -3296,21 +3296,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