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@lists.koha-community.org
          Reporter: alei...@catalyst.net.nz
        QA Contact: testo...@bugs.koha-community.org
                CC: gmcha...@gmail.com, kyle.m.h...@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.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to