[Koha-bugs] [Bug 24013] New: Transferring a checked out item gives a software error

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Nov 11 21:37:05 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24013

            Bug ID: 24013
           Summary: Transferring a checked out item gives a software error
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Circulation
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: aleisha at catalyst.net.nz
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com

To reproduce:
1. check out an item
2. Go to circulation -> transfer and put in the barcode of the item you just
checked out
3. error: Can't call method "borrowernumber" on unblessed reference at
/home/vagrant/kohaclone/C4/Circulation.pm line 350

This occurs in the C4::Circulation::transferbook subroutine. It happens because
Bug 18276 accidentally reintroduces an old subroutine (GetOpenIssue) that
returns an unblessed reference. This line should use Koha Objects instead.

Code causing an error:

my $issue = GetOpenIssue($itemnumber);
# check if it is still issued to someone, return it...
if ( $issue ) {
    AddReturn( $barcode, $fbr );
    $messages->{'WasReturned'} = $issue->borrowernumber;
}

Suggested fix:

my $issue = Koha::Checkouts->find({ itemnumber => $itemnumber });

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list