Bug 26900

Summary: Fixes Koka::Libraries typo in C4/Reserves.pm
Product: Koha Reporter: Blou <philippe.blouin>
Component: Hold requestsAssignee: Blou <philippe.blouin>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: aleisha, gmcharlt, jonathan.druart, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.06
Circulation function:
Bug Depends on: 22284    
Bug Blocks:    
Attachments: Bug 26900: Fixes Koka::Libraries typo in C4/Reserves.pm
Bug 26900: Fixes Koka::Libraries typo in C4/Reserves.pm
Bug 26900: Fixes Koka::Libraries typo in C4/Reserves.pm

Description Blou 2020-11-02 19:23:46 UTC
Plain simple:

my $home_library = Koka::Libraries->find( {branchcode => $item->homebranch} );

This patch replaces 'Koka' by 'Koha'.
Comment 1 Blou 2020-11-02 19:25:31 UTC
Created attachment 112864 [details] [review]
Bug 26900: Fixes Koka::Libraries typo in C4/Reserves.pm

Plain simple:

my $home_library = Koka::Libraries->find( {branchcode => $item->homebranch} );

This patch replaces 'Koka' by 'Koha'.
Comment 2 Blou 2020-11-02 19:33:38 UTC
this is also in 20.05, and I suppose 20.11.

I'm checking and rechecking if I'm crazy.  This would not have triggered for anybody else in 18 months?!
Comment 3 Blou 2020-11-02 20:20:03 UTC
well, my maths suck.  I guess I'm too used to work on 19.05
Comment 4 David Nind 2020-11-02 20:47:22 UTC
Created attachment 112870 [details] [review]
Bug 26900: Fixes Koka::Libraries typo in C4/Reserves.pm

Plain simple:

my $home_library = Koka::Libraries->find( {branchcode => $item->homebranch} );

This patch replaces 'Koka' by 'Koha'.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2020-11-02 21:46:20 UTC
Created attachment 112880 [details] [review]
Bug 26900: Fixes Koka::Libraries typo in C4/Reserves.pm

Plain simple:

my $home_library = Koka::Libraries->find( {branchcode => $item->homebranch} );

This patch replaces 'Koka' by 'Koha'.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2020-11-02 21:46:53 UTC
Is it possible that the if ($pickup_library) {} is dead code? 

The only time we seem to be using the parameter is in a test in t/db_dependent/Reserves.t.

Or... should we have been using it somewhere?
Comment 7 Blou 2020-11-02 22:02:06 UTC
Not exactly sure, but this occurred in the opening sequences of our testing of 20.05.05  

- Default database
- No modification of preferences
- add a rule to allow all to put on reserve.
- add one record with one item using "book" as itemtype
- Search for it in the OPAC
- click on Hold, select a library, save, boom!

So this was through the UI, and I *presume* of normal usage by our librarian who gave me the steps to reproduce.
Comment 8 Jonathan Druart 2020-11-03 08:19:52 UTC
Caused by
  commit a998ba5714c8dc1b78062e95bd78e2738112737d
  Bug 22284: Control hold groups in C4::Reserves
Comment 9 Jonathan Druart 2020-11-03 10:00:13 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 10 Lucas Gass (lukeg) 2020-11-16 20:36:06 UTC
backported to 20.05.x for 20.05.06
Comment 11 Aleisha Amohia 2020-11-17 05:22:20 UTC
missing dependencies, not backported to 19.11.x