Bug 41624 - Revert Bug 35211
Summary: Revert Bug 35211
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on: 35211
Blocks: 41566
  Show dependency treegraph
 
Reported: 2026-01-14 21:46 UTC by Lucas Gass (lukeg)
Modified: 2026-02-09 15:41 UTC (History)
2 users (show)

See Also:
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:
26.05.00
Circulation function:


Attachments
Bug 41624: Improve how branchcodes are handled (3.20 KB, patch)
2026-01-14 21:51 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Move other_holdings_count outside of loop so it is only calculated once (1.08 KB, patch)
2026-01-14 21:51 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting" (4.44 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: (QA follow-up) fix display of other results tab and move template toolkit logic outside of script array" (2.54 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: Removed local items from group tabs and removed group items from other holdings tab" (4.03 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: Fixed group tab item building logic" (945 bytes, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: Fix tab building" (1.90 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: Set SeparateHoldingsByGroup to separate based on SeparateHoldingsBranch syspref" (1.25 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: Fixed count on logged in holdings" (2.31 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames" (2.61 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert "Bug 35211: Separate group holdings into individual tabs" (9.95 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: DB update to remove the pref (1.52 KB, patch)
2026-02-04 16:55 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 41624: Revert bug 35211 (16.20 KB, patch)
2026-02-09 10:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41624: Simplify db rev (1.87 KB, patch)
2026-02-09 10:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 41624: Revert bug 35211 (16.25 KB, patch)
2026-02-09 12:28 UTC, Paul Derscheid
Details | Diff | Splinter Review
Bug 41624: Simplify db rev (1.92 KB, patch)
2026-02-09 12:28 UTC, Paul Derscheid
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2026-01-14 21:46:59 UTC
Bug 35211 has some problems. 

1. This is hard to read/maintain:

        const branchcodes = { 
          [% FOREACH key IN branchcodes.keys %]
            "[% key | html %]": [
              [% FOREACH code IN branchcodes.$key %]
                "[% code | html %]"[% UNLESS loop.last %], [% END %]
              [% END %]
            ][% UNLESS loop.last %], [% END %]
          [% END %]
        };


2. If you select Show/Hide filters on the group holdings table the table disappears. 

3. other_holdings_count is counted over and over inside the loop, it isn't necessary to do so. 

4. The code seems to unnecessarily touch colvis settings
Comment 1 Lucas Gass (lukeg) 2026-01-14 21:51:25 UTC
Created attachment 191470 [details] [review]
Bug 41624: Improve how branchcodes are handled

-This patch is an attempt to improve how we retrive branchcodes. Too much of this logic is unnesseary done in the template.
-This also removed the unneeded "use Koha::Library::Group;"
Comment 2 Lucas Gass (lukeg) 2026-01-14 21:51:32 UTC
Created attachment 191471 [details] [review]
Bug 41624: Move other_holdings_count outside of loop so it is only calculated once
Comment 3 Jonathan Druart 2026-01-19 09:19:04 UTC
1. If the pref is ON and nothing else is configured, you see that:
https://snipboard.io/ZgGc7P.jpg
Looks like no tab is active.

2. When a group is defined, you have the new tab.
But the table on this tab has the pagination, it should not.

3. If you click "Show filters" on the new tab: "Uncaught TypeError: can't access property "DataTable", items_table is undefined"

4. ColVis on this tab uses the wrong localStorage key: DataTables_catalogue_detail_otherholdings_table
So the state is not correctly restored. (ie. hide a column, reload the page: the column is visible)
Comment 4 Lucas Gass (lukeg) 2026-01-30 20:08:28 UTC
I'm changing the title here. We need to revert Bug 35211, there are too many problems with its implementation.
Comment 5 Lucas Gass (lukeg) 2026-02-04 16:55:28 UTC
Created attachment 192464 [details] [review]
Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting"

This reverts commit 97a022054db86f076844228e01e31e3aac045d9a.
Comment 6 Lucas Gass (lukeg) 2026-02-04 16:55:31 UTC
Created attachment 192465 [details] [review]
Bug 41624: Revert "Bug 35211: (QA follow-up) fix display of other results tab and move template toolkit logic outside of script array"

This reverts commit c4c2a4b235ccefee0c54892c1ca1057465987918.
Comment 7 Lucas Gass (lukeg) 2026-02-04 16:55:33 UTC
Created attachment 192466 [details] [review]
Bug 41624: Revert "Bug 35211: Removed local items from group tabs and removed group items from other holdings tab"

This reverts commit 124c6c867065d4230ffa5553ca2b629e05b269a0.
Comment 8 Lucas Gass (lukeg) 2026-02-04 16:55:36 UTC
Created attachment 192467 [details] [review]
Bug 41624: Revert "Bug 35211: Fixed group tab item building logic"

This reverts commit 23eb2dbd39ab7f46c19b299cef3db435a9ed4b7e.
Comment 9 Lucas Gass (lukeg) 2026-02-04 16:55:38 UTC
Created attachment 192468 [details] [review]
Bug 41624: Revert "Bug 35211: Fix tab building"

This reverts commit f438535b5cfe868784bb6881839c58242432da71.
Comment 10 Lucas Gass (lukeg) 2026-02-04 16:55:41 UTC
Created attachment 192469 [details] [review]
Bug 41624: Revert "Bug 35211: Set SeparateHoldingsByGroup to separate based on SeparateHoldingsBranch syspref"

This reverts commit d2a0527d86e82ff1edf0c31035f5ac9da232b5fe.
Comment 11 Lucas Gass (lukeg) 2026-02-04 16:55:43 UTC
Created attachment 192470 [details] [review]
Bug 41624: Revert "Bug 35211: Fixed count on logged in holdings"

This reverts commit 96c7eb3459770c354f59fcc1d4c22ebc4eb2a559.
Comment 12 Lucas Gass (lukeg) 2026-02-04 16:55:46 UTC
Created attachment 192471 [details] [review]
Bug 41624: Revert "Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames"

This reverts commit 5c2b0fd49689b4bdaa392fc165a8fc97c1fafa1e.
Comment 13 Lucas Gass (lukeg) 2026-02-04 16:55:49 UTC
Created attachment 192472 [details] [review]
Bug 41624: Revert "Bug 35211: Separate group holdings into individual tabs"

This reverts commit 08045c8009c52596d8df83e5da12d9e4e9abb9ae.
Comment 14 Lucas Gass (lukeg) 2026-02-04 16:55:51 UTC
Created attachment 192473 [details] [review]
Bug 41624: DB update to remove the pref
Comment 15 Jonathan Druart 2026-02-09 10:39:04 UTC
Created attachment 192724 [details] [review]
Bug 41624: Revert bug 35211

Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting"

This reverts commit 97a022054db86f076844228e01e31e3aac045d9a.

Bug 41624: Revert "Bug 35211: (QA follow-up) fix display of other results tab and move template toolkit logic outside of script array"

This reverts commit c4c2a4b235ccefee0c54892c1ca1057465987918.

Bug 41624: Revert "Bug 35211: Removed local items from group tabs and removed group items from other holdings tab"

This reverts commit 124c6c867065d4230ffa5553ca2b629e05b269a0.

Bug 41624: Revert "Bug 35211: Fixed group tab item building logic"

This reverts commit 23eb2dbd39ab7f46c19b299cef3db435a9ed4b7e.

Bug 41624: Revert "Bug 35211: Fix tab building"

This reverts commit f438535b5cfe868784bb6881839c58242432da71.

Bug 41624: Revert "Bug 35211: Set SeparateHoldingsByGroup to separate based on SeparateHoldingsBranch syspref"

This reverts commit d2a0527d86e82ff1edf0c31035f5ac9da232b5fe.

Bug 41624: Revert "Bug 35211: Fixed count on logged in holdings"

This reverts commit 96c7eb3459770c354f59fcc1d4c22ebc4eb2a559.

Bug 41624: Revert "Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames"

This reverts commit 5c2b0fd49689b4bdaa392fc165a8fc97c1fafa1e.

Bug 41624: Revert "Bug 35211: Separate group holdings into individual tabs"

This reverts commit 08045c8009c52596d8df83e5da12d9e4e9abb9ae.

Bug 41624: DB update to remove the pref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Jonathan Druart 2026-02-09 10:39:05 UTC
Created attachment 192725 [details] [review]
Bug 41624: Simplify db rev

Also fix QA failures:
[FAIL] installer/data/mysql/atomicupdate/bug_41624.pl
   FAIL   file_permissions
                File must have the exec flag
   FAIL   forbidden_patterns
                forbidden pattern: trailing space char (line 13)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 17 Jonathan Druart 2026-02-09 10:39:38 UTC
Squashed the reverted commits.
Comment 18 Paul Derscheid 2026-02-09 12:28:40 UTC
Created attachment 192785 [details] [review]
Bug 41624: Revert bug 35211

Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting"

This reverts commit 97a022054db86f076844228e01e31e3aac045d9a.

Bug 41624: Revert "Bug 35211: (QA follow-up) fix display of other results tab and move template toolkit logic outside of script array"

This reverts commit c4c2a4b235ccefee0c54892c1ca1057465987918.

Bug 41624: Revert "Bug 35211: Removed local items from group tabs and removed group items from other holdings tab"

This reverts commit 124c6c867065d4230ffa5553ca2b629e05b269a0.

Bug 41624: Revert "Bug 35211: Fixed group tab item building logic"

This reverts commit 23eb2dbd39ab7f46c19b299cef3db435a9ed4b7e.

Bug 41624: Revert "Bug 35211: Fix tab building"

This reverts commit f438535b5cfe868784bb6881839c58242432da71.

Bug 41624: Revert "Bug 35211: Set SeparateHoldingsByGroup to separate based on SeparateHoldingsBranch syspref"

This reverts commit d2a0527d86e82ff1edf0c31035f5ac9da232b5fe.

Bug 41624: Revert "Bug 35211: Fixed count on logged in holdings"

This reverts commit 96c7eb3459770c354f59fcc1d4c22ebc4eb2a559.

Bug 41624: Revert "Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames"

This reverts commit 5c2b0fd49689b4bdaa392fc165a8fc97c1fafa1e.

Bug 41624: Revert "Bug 35211: Separate group holdings into individual tabs"

This reverts commit 08045c8009c52596d8df83e5da12d9e4e9abb9ae.

Bug 41624: DB update to remove the pref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 19 Paul Derscheid 2026-02-09 12:28:43 UTC
Created attachment 192786 [details] [review]
Bug 41624: Simplify db rev

Also fix QA failures:
[FAIL] installer/data/mysql/atomicupdate/bug_41624.pl
   FAIL   file_permissions
                File must have the exec flag
   FAIL   forbidden_patterns
                forbidden pattern: trailing space char (line 13)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Comment 20 Lucas Gass (lukeg) 2026-02-09 15:41:23 UTC
Push to main for 26.05.00. 


Thanks all!