Bug 31307

Summary: already_reserved never used in opac/opac-reserve.pl
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: nick, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Bug Depends on:    
Bug Blocks: 31314    
Attachments: Bug 31307: Remove 'already_reserved' flag from opac-reserve.pl
Bug 31307: Remove 'already_reserved' flag from opac-reserve.pl

Description Jonathan Druart 2022-08-08 14:12:46 UTC
my $policy_holdallowed = !$itemLoopIter->{already_reserved};

This "already_reserved" is never used.
Comment 1 Jonathan Druart 2022-08-08 15:06:41 UTC
Created attachment 138834 [details] [review]
Bug 31307: Remove 'already_reserved' flag from opac-reserve.pl

It was never set (was set before 14695)
Comment 2 Nick Clemens (kidclamp) 2022-08-09 14:51:45 UTC
Created attachment 138920 [details] [review]
Bug 31307: Remove 'already_reserved' flag from opac-reserve.pl

It was never set (was set before 14695)

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 3 Nick Clemens (kidclamp) 2022-08-09 14:52:01 UTC
Trivial, passing QA
Comment 4 Tomás Cohen Arazi 2022-08-09 16:20:11 UTC
For the record:

$ git grep already_reserved | grep -v translator

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt:                                    [% IF ( bibitemloo.already_reserved ) %]
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt:                                    [% END # / IF bibitemloo.already_reserved %]
opac/opac-reserve.pl:    $biblioLoopIter{already_reserved} = $biblioData->{already_reserved};
opac/opac-reserve.pl:    if ($biblioLoopIter{already_reserved}) {
Comment 5 Tomás Cohen Arazi 2022-08-09 16:29:40 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Jonathan Druart 2022-08-10 09:21:57 UTC
(In reply to Tomás Cohen Arazi from comment #4)
> For the record:
> 
> $ git grep already_reserved | grep -v translator
> 
> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt:                   
> [% IF ( bibitemloo.already_reserved ) %]
> koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt:                   
> [% END # / IF bibitemloo.already_reserved %]
> opac/opac-reserve.pl:    $biblioLoopIter{already_reserved} =
> $biblioData->{already_reserved};
> opac/opac-reserve.pl:    if ($biblioLoopIter{already_reserved}) {

Yes, the commit message could have been a bit more verbose. The flag was set to $itemLoopIter, which was never used. biblioLoopIter does use it.