Bug 31307 - already_reserved never used in opac/opac-reserve.pl
Summary: already_reserved never used in opac/opac-reserve.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 31314
  Show dependency treegraph
 
Reported: 2022-08-08 14:12 UTC by Jonathan Druart
Modified: 2023-12-28 20:42 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:


Attachments
Bug 31307: Remove 'already_reserved' flag from opac-reserve.pl (1.14 KB, patch)
2022-08-08 15:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31307: Remove 'already_reserved' flag from opac-reserve.pl (1.20 KB, patch)
2022-08-09 14:51 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

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