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

Evergreen Git git at git.evergreen-ils.org
Wed Feb 15 11:26:16 EST 2017


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  f8d57cbc3a206d9e7f454cb99c75e41dd972a842 (commit)
      from  5160e5f64e0bd386e274256c18456a686665e882 (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 f8d57cbc3a206d9e7f454cb99c75e41dd972a842
Author: Jason Stephenson <jason at sigio.com>
Date:   Tue Nov 22 14:35:58 2016 -0500

    LP 1473054: No-op Checkin Should Not Always Float a Floating Copy.
    
    Prior to this patch, a no-op checkin would not check if a copy should
    float using the evergreen.can_float() function.  It would simply float
    the copy to the org_unit where the checkin happened if the copy had a
    float value set.
    
    This commit changes the behavior to use evergreen.can_float() to
    determine if the copy should float to the org_unit where the checkin
    happened.  This change makes the behavior consistent with a regular
    checkin.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Josh Stompro <stomproj at larl.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.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 8daab0c..ad6fff2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -2605,10 +2605,22 @@ sub do_checkin {
             }
         }
     } else { # no-op checkin
-        if ($U->is_true( $self->copy->floating )) { # XXX floating items still stick where they are even with no-op checkin?
-            $self->checkin_changed(1);
-            $self->copy->circ_lib( $self->circ_lib );
-            $self->update_copy;
+        if ($self->copy->floating) { # XXX floating items still stick where they are even with no-op checkin?
+            my $res = $self->editor->json_query(
+                {
+                    from => [
+                        'evergreen.can_float',
+                        $self->copy->floating->id,
+                        $self->copy->circ_lib,
+                        $self->circ_lib
+                    ]
+                }
+            );
+            if ($res && @$res && $U->is_true($res->[0]->{'evergreen.can_float'})) {
+                $self->checkin_changed(1);
+                $self->copy->circ_lib( $self->circ_lib );
+                $self->update_copy;
+            }
         }
     }
 

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Circ/Circulate.pm      |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list