[open-ils-commits] [GIT] Evergreen ILS branch rel_2_0 updated. 5099a30d417c5528cf11fa7883db8f7b70f21a8d

Evergreen Git git at git.evergreen-ils.org
Tue Dec 6 09:54:53 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_0 has been updated
       via  5099a30d417c5528cf11fa7883db8f7b70f21a8d (commit)
       via  bb6ba8d5a09b09de80f1a77f266a0bc699ea7992 (commit)
       via  c585210523799819e2c96bb25d79f798398ee69d (commit)
      from  137556ce7b175b13759ca30b629de0d906aaa5f8 (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 5099a30d417c5528cf11fa7883db8f7b70f21a8d
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/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
index b6bf4c9..6f06bae 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
@@ -3007,11 +3007,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;
     }
@@ -3068,12 +3074,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 bb6ba8d5a09b09de80f1a77f266a0bc699ea7992
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/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
index 430a7c5..b6bf4c9 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
@@ -3068,7 +3068,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 c585210523799819e2c96bb25d79f798398ee69d
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/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
index 19510f5..430a7c5 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
@@ -3006,21 +3006,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:
 .../perlmods/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