Bug 41566

Summary: Tidy kohaTable block - catalogue
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: TemplatesAssignee: Jonathan Druart <jonathan.druart>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 39715, 41560, 41624    
Bug Blocks: 41324    
Attachments: Bug 41566: Tidy kohaTable - catalogue/issuehistory
Bug 41566: Tidy kohaTable - catalogue/itemsearch.tt
Bug 41566: Tidy kohaTable - catalogue_detail.inc|catalogue/detail.tt
Bug 41566: catalogue - auto tidy
Bug 41566: catalogue - auto tidy
Bug 41566: Tidy kohaTable - catalogue/issuehistory
Bug 41566: Tidy kohaTable - catalogue/itemsearch.tt
Bug 41566: Tidy kohaTable - catalogue_detail.inc|catalogue/detail.tt
Bug 41566: catalogue - auto tidy
Bug 41566: (follow-up) Prevent runtime error by assigning int to ClaimReturnedLostValue
Bug 41566: (follow-up) Prevent runtime error by assigning fallback falsy value to ClaimReturnedLostValue

Description Jonathan Druart 2026-01-09 13:58:01 UTC

    
Comment 1 Jonathan Druart 2026-01-09 14:46:06 UTC
Created attachment 191103 [details] [review]
Bug 41566: Tidy kohaTable - catalogue/issuehistory

Patch from commit ada6d06
Comment 2 Jonathan Druart 2026-01-09 14:46:07 UTC
Created attachment 191104 [details] [review]
Bug 41566: Tidy kohaTable - catalogue/itemsearch.tt

Patch from commit 7e49732
Comment 3 Jonathan Druart 2026-01-09 14:46:08 UTC
Created attachment 191105 [details] [review]
Bug 41566: Tidy kohaTable - catalogue_detail.inc|catalogue/detail.tt

This is a non-trivial one.

* SpineLabelShowPrintOnBibDetails is removed from the controller and we
  fetch it from the Koha.Preference TT plugin (because it is how it should be)
* A lot of JS variable instantiations are moved in a dedicated script tag: they all use TT plugins
* We are using stores to permissions and sysprefs

That's a lot of changes but nothing complicated, just a move from TT
vars to JS vars

To test this you will need to fully test the holdings tables.
Comment 4 Jonathan Druart 2026-01-09 14:46:09 UTC
Created attachment 191106 [details] [review]
Bug 41566: catalogue - auto tidy

Patch from commit 5933c95
Comment 5 Jonathan Druart 2026-02-09 10:41:50 UTC
Created attachment 192726 [details] [review]
Bug 41566: catalogue - auto tidy

Patch from commit 0aeaf40
Comment 6 Paul Derscheid 2026-02-09 12:33:09 UTC
Created attachment 192787 [details] [review]
Bug 41566: Tidy kohaTable - catalogue/issuehistory

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 7 Paul Derscheid 2026-02-09 12:33:11 UTC
Created attachment 192788 [details] [review]
Bug 41566: Tidy kohaTable - catalogue/itemsearch.tt

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 8 Paul Derscheid 2026-02-09 12:33:14 UTC
Created attachment 192789 [details] [review]
Bug 41566: Tidy kohaTable - catalogue_detail.inc|catalogue/detail.tt

This is a non-trivial one.

* SpineLabelShowPrintOnBibDetails is removed from the controller and we
  fetch it from the Koha.Preference TT plugin (because it is how it should be)
* A lot of JS variable instantiations are moved in a dedicated script tag: they all use TT plugins
* We are using stores to permissions and sysprefs

That's a lot of changes but nothing complicated, just a move from TT
vars to JS vars

To test this you will need to fully test the holdings tables.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 9 Paul Derscheid 2026-02-09 12:33:16 UTC
Created attachment 192790 [details] [review]
Bug 41566: catalogue - auto tidy

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 10 Paul Derscheid 2026-02-09 12:53:11 UTC
Created attachment 192793 [details] [review]
Bug 41566: (follow-up) Prevent runtime error by assigning int to ClaimReturnedLostValue
Comment 11 Paul Derscheid 2026-02-09 13:19:38 UTC
Created attachment 192794 [details] [review]
Bug 41566: (follow-up) Prevent runtime error by assigning fallback falsy value to ClaimReturnedLostValue