"no-op" checkins use old global behavior for floating items

Bug #1473054 reported by Jason Etheridge
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.10
Fix Released
Medium
Unassigned
2.11
Fix Released
Medium
Unassigned

Bug Description

This happens when you use the Suppress Holds and Transits checkin modifier during Item Check In, or when you use the "Normal Checkin then Checkout" action when attempting to check out an already circulating item.

If a floating group is set on the item, the code just treats it as "true" and changes the circ library, regardless of the floating group membership.

Circ/Circulate.pm, line 2583
    } 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;
        }
    }

Tags: pullrequest
Changed in evergreen:
status: New → Confirmed
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I can confirm that this is an issue in 2.8.4.

We have been scratching our heads about why items were floating to a different library system occasionally. Finally figured out that it happens when an item that is already checked out, gets checked out to a new patron using the "Normal Checkin then Checkout" action. Then found this bug report.

We are a consortium of two regional library systems, one system floats everything, and the other floats nothing. We also share all holdable items between both systems.

Steps to test this issue.

1. Setup a copy with a floating group that allows floating in System A only. The copy should have a circ lib of a branch is system A.
2. Check out the item to a patron at a branch in System B.
3. Check out the item to a second patron at System B without checking it in first.
4. When you check out the item, choose the "Normal Checkin then Checkout" action.
5. View the copy to see that the circ_lib has been changed to the branch in system B.

Would the proper fix be to use the new floating groups logic, or to just not float from a no-op checkin?

Josh

Revision history for this message
Joan Kranich (jkranich) wrote :

I can confirm that this is an issue in 2.10.7.

Joan

Revision history for this message
Jason Stephenson (jstephenson) wrote :

This comment is interesting: "# XXX floating items still stick where they are even with no-op checkin?" It asks the question if copies should float on a no-op checkin.

I was going to make the no-op checkin code behave as the block above where floating is checked via the evergreen.can_float() database function. (In that case it would be handy to add a utility function so the code is in one place.) However, that comment makes me wonder if floating should be considered at all on a no-op checkin?

If no-op should not cause copies to float, then the fix for this bug is as simple as removing the else block for a no-op checkin. If the consensus is that copies should float on a no-op checkin, then we'll need to go through the evergreen.can_float function.

I'll start a branch to do the latter in the meantime.

Changed in evergreen:
milestone: none → 2.next
assignee: nobody → Jason Stephenson (jstephenson)
Revision history for this message
Kathy Lussier (klussier) wrote :

My initial reaction is that no-op checkins should float. For the "Normal Checkin then Checkout" use case, I think either approach could work. However, for the "Suppress Holds and Transits" use case, I think the system should properly change the circulation library if it's required by the floating configuration.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

Branch to fix this in working/user/dyrcona/lp1473054_no-op_may_float

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1473054_no-op_may_float

Pretty much a copy and paste of the float code for a normal checkin with a small edit to make sense in the context of a no-op checkin.

We're using this in production already.

Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
tags: added: pullrequest
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I just tested this out on our test system running 2.10.6 and it worked as expected. I'm going to try it out in production tomorrow.

Signoff branch at user/stompro/lp1473054_no-op_may_float_signoff

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/stompro/lp1473054_no-op_may_float_signoff

Thanks Jason!
Josh

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

We are now also running this in production. I'll report back if we have any problems.

Josh

Kathy Lussier (klussier)
Changed in evergreen:
importance: Undecided → Medium
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed to master, rel_2_11, and rel_2_10. Thanks, Jason and Josh!

Changed in evergreen:
status: Confirmed → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
milestone: 2.next → 2.12-beta
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.