Bug 33553

Summary: Unecessary GetCategories calls in template
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: unspecified   
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:
23.05.00,22.11.07
Bug Depends on: 12461    
Bug Blocks:    
Attachments: Bug 33553: Remove unecessary GetCategories calls in templates
Bug 33553: Remove unecessary GetCategories calls in templates

Description Jonathan Druart 2023-04-18 10:59:22 UTC
koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs-add-modify.tt:[% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %]
koha-tmpl/intranet-tmpl/prog/en/modules/clubs/patron-enroll.tt:[% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %]
koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/enroll.tt:[% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %]

AuthorisedValuesCategories is not used later.
Comment 1 Owen Leonard 2023-05-15 16:26:18 UTC
Created attachment 151200 [details] [review]
Bug 33553: Remove unecessary GetCategories calls in templates

This patch removes unnecessary references to
AuthorisedValues.GetCategories:

SET AuthorisedValuesCategories = AuthorisedValues.GetCategories

The AuthorisedValuesCategories variable is not used.

To test, apply the patch and go to Tools -> Patron clubs.

- If necessary, create a club template with "Allow public enrollment"
  enabled.
- Create a new club. The club creation process should work correctly.
- Open a patron account for checkout and confirm that you can enroll the
  patron in the new club via the "Clubs" tab.
- Log in to the OPAC and confirm that you can successfully enroll
  yourself in the new club via the "Clubs" tab on your patron summary
  page.
Comment 2 Jonathan Druart 2023-05-16 06:49:27 UTC
Created attachment 151245 [details] [review]
Bug 33553: Remove unecessary GetCategories calls in templates

This patch removes unnecessary references to
AuthorisedValues.GetCategories:

SET AuthorisedValuesCategories = AuthorisedValues.GetCategories

The AuthorisedValuesCategories variable is not used.

To test, apply the patch and go to Tools -> Patron clubs.

- If necessary, create a club template with "Allow public enrollment"
  enabled.
- Create a new club. The club creation process should work correctly.
- Open a patron account for checkout and confirm that you can enroll the
  patron in the new club via the "Clubs" tab.
- Log in to the OPAC and confirm that you can successfully enroll
  yourself in the new club via the "Clubs" tab on your patron summary
  page.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Jonathan Druart 2023-05-16 06:49:44 UTC
trivial, skipping QA.
Comment 4 Tomás Cohen Arazi 2023-05-16 18:19:41 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 5 Matt Blenkinsop 2023-06-08 16:08:34 UTC
Nice work everyone!

Pushed to stable for 22.11.x