Bug 31519 - Unused template parameters in request.pl
Summary: Unused template parameters in request.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Joonas Kylmälä
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-04 07:42 UTC by Joonas Kylmälä
Modified: 2023-12-28 20:42 UTC (History)
2 users (show)

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


Attachments
Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables (1.11 KB, patch)
2022-09-04 07:50 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 31519: Move preference fetching directly to be done in the template (2.17 KB, patch)
2022-09-04 07:50 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables (1.15 KB, patch)
2022-09-18 21:27 UTC, David Nind
Details | Diff | Splinter Review
Bug 31519: Move preference fetching directly to be done in the template (2.21 KB, patch)
2022-09-18 21:27 UTC, David Nind
Details | Diff | Splinter Review
Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables (1.21 KB, patch)
2022-10-07 22:53 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31519: Move preference fetching directly to be done in the template (2.27 KB, patch)
2022-10-07 22:53 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Kylmälä 2022-09-04 07:42:41 UTC
reserve/request.pl sets SuspendHoldsIntranet and AutoResumeSuspendedHolds template parameters which are not used in any templates or template includes. Those should be removed.
Comment 1 Joonas Kylmälä 2022-09-04 07:50:00 UTC
Created attachment 140199 [details] [review]
Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables

If you grep koha-tmpl/intranet-tmpl/prog/en for those you will see
there are no references for those.
Comment 2 Joonas Kylmälä 2022-09-04 07:50:04 UTC
Created attachment 140200 [details] [review]
Bug 31519: Move preference fetching directly to be done in the template

Since we are not in a loop or using this multiple times it's simple to
do it this way, helps with changing the template code in the future
too since if we want to remove this syspref variable we know it is
only used in this one particular place.

To test:
 1) Grep for reserve_in_future and make sure there are no matches
    after applying this patch
Comment 3 David Nind 2022-09-18 21:27:48 UTC
Created attachment 140741 [details] [review]
Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables

If you grep koha-tmpl/intranet-tmpl/prog/en for those you will see
there are no references for those.

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2022-09-18 21:27:52 UTC
Created attachment 140742 [details] [review]
Bug 31519: Move preference fetching directly to be done in the template

Since we are not in a loop or using this multiple times it's simple to
do it this way, helps with changing the template code in the future
too since if we want to remove this syspref variable we know it is
only used in this one particular place.

To test:
 1) Grep for reserve_in_future and make sure there are no matches
    after applying this patch

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2022-09-18 21:32:27 UTC
Have signed off, but noted that there are two occurrences after running git grep reserve_in_future that relate to the OPAC:

root@kohadevbox:koha(bz31519)$ git grep reserve_in_future
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt:                                                [% IF ( reserve_in_future ) %]
opac/opac-reserve.pl:       reserve_in_future         => 1,

I'm assuming that's because this bug is only making changes to the staff interface.
Comment 6 Katrin Fischer 2022-10-07 22:53:31 UTC
Created attachment 141534 [details] [review]
Bug 31519: Remove unused SuspendHoldsIntranet and AutoResumeSuspendedHolds variables

If you grep koha-tmpl/intranet-tmpl/prog/en for those you will see
there are no references for those.

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2022-10-07 22:53:35 UTC
Created attachment 141535 [details] [review]
Bug 31519: Move preference fetching directly to be done in the template

Since we are not in a loop or using this multiple times it's simple to
do it this way, helps with changing the template code in the future
too since if we want to remove this syspref variable we know it is
only used in this one particular place.

To test:
 1) Grep for reserve_in_future and make sure there are no matches
    after applying this patch

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Tomás Cohen Arazi 2022-10-11 13:23:46 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!