Comment 2 for bug 1511765

Revision history for this message
Michele Morgan (mmorgan) wrote :

I'm dusting off this bug because it not only affects migrated items, but also any item with status Lost, Long Overdue, or Lost and Paid where the associated circ row no longer exists, like when the circ has been aged.

To reproduce:

Set the library setting circ.checkin.lost_zero_balance.do_not_change to TRUE
Check out an item to a patron
Mark the item Lost
Pay the lost billing
Delete the patron record
Check in the item

This is the error I receive:

Network or server failure. Please check your Internet connection to egtraining.noblenet.org and choose Retry Network. If you need to enter Offline Mode, choose Ignore Errors in this and subsequent dialogs. If you believe this error is due to a bug in Evergreen and not network problems, please contact your help desk or friendly Evergreen administrators, and give them this information:
method=open-ils.circ.checkin
params=["2d7301f08eeabb701f953e06d8e1ce4e",{"barcode":"33011003666805"}]
THROWN:
{"payload":[],"debug":"osrfMethodException : *** Call to [open-ils.circ.checkin] failed for session [1527007244.182468.152700724437466], thread trace [1]:\nCan't call method \"id\" on an undefined value at /usr/local/share/perl/5.14.2/OpenILS/Application/Circ/Circulate.pm line 2371.\n\n","status":500}
STATUS:

Here is the clause in Circulate.pm referenced by the error:

        if ($dont_change_lost_zero) {
            my ($obt) = $U->fetch_mbts($self->circ->id, $self->editor);
            $dont_change_lost_zero = 0 if( $obt and $obt->balance_owed != 0 );
        }

The code should not assume that there is an associated row in the circ table for the item.