Bug 22895 - [18.11] cannot place item level holds
Summary: [18.11] cannot place item level holds
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: 18.11
Hardware: All All
: P5 - low critical (vote)
Target Milestone: ---
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 22650
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-13 15:04 UTC by Nick Clemens
Modified: 2019-05-14 12:07 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
18.11.06


Attachments
Bug 22895: Correct itemnumber call in placerequest.pl (1.21 KB, patch)
2019-05-13 15:09 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl (1.53 KB, patch)
2019-05-13 15:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 22895: (bug 22650 follow-up) Correct itemnumber call in placerequest.pl (1.59 KB, patch)
2019-05-14 12:05 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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