Bug 22895

Summary: [18.11] cannot place item level holds
Product: Koha Reporter: Nick Clemens <nick>
Component: Hold requestsAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: gmcharlt, jonathan.druart, martin.renvoize
Version: 18.11   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22898
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
18.11.06
Bug Depends on: 22650    
Bug Blocks:    
Attachments: Bug 22895: Correct itemnumber call in placerequest.pl
Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl
Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl

Description Nick Clemens 2019-05-13 15:04:59 UTC
Backport of 22650 makes an object call to an item hashref retrieved by get item:

  94             if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status} eq 'OK' ) {

Should be $item->{itemnumber}
Comment 1 Nick Clemens 2019-05-13 15:09:39 UTC
Created attachment 89666 [details] [review]
Bug 22895: Correct itemnumber call in placerequest.pl

To test:
1 - Try to place an item level hold
2 - It fails
3 - Aply patch
4 - Try again
5 - It works!
Comment 2 Jonathan Druart 2019-05-13 15:50:11 UTC
Created attachment 89669 [details] [review]
Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl

Backport of 22650 makes an object call to an item hashref retrieved by get item:

  94             if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status} eq 'OK' ) {

Should be $item->{itemnumber}

To test:
1 - Try to place an item level hold
2 - It fails
3 - Aply patch
4 - Try again
5 - It works!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2019-05-13 15:50:56 UTC
Upping severity, sending directly to Martin.

Shall we alert the list?
Comment 4 Martin Renvoize 2019-05-14 12:05:12 UTC
Created attachment 89735 [details] [review]
Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl

Backport of 22650 makes an object call to an item hashref retrieved by get item:

  94             if ( CanItemBeReserved($borrower->{'borrowernumber'}, $item->itemnumber, $branch)->{status} eq 'OK' ) {

Should be $item->{itemnumber}

To test:
1 - Try to place an item level hold
2 - It fails
3 - Aply patch
4 - Try again
5 - It works!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2019-05-14 12:07:41 UTC
Annoying I missed this, thanks for the report Nick and quick QA Jonathan.

Pushed to 18.11.x for 18.11.06