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
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;"
Created attachment 191471 [details] [review] Bug 41624: Move other_holdings_count outside of loop so it is only calculated once
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)
I'm changing the title here. We need to revert Bug 35211, there are too many problems with its implementation.
Created attachment 192464 [details] [review] Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting" This reverts commit 97a022054db86f076844228e01e31e3aac045d9a.
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.
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.
Created attachment 192467 [details] [review] Bug 41624: Revert "Bug 35211: Fixed group tab item building logic" This reverts commit 23eb2dbd39ab7f46c19b299cef3db435a9ed4b7e.
Created attachment 192468 [details] [review] Bug 41624: Revert "Bug 35211: Fix tab building" This reverts commit f438535b5cfe868784bb6881839c58242432da71.
Created attachment 192469 [details] [review] Bug 41624: Revert "Bug 35211: Set SeparateHoldingsByGroup to separate based on SeparateHoldingsBranch syspref" This reverts commit d2a0527d86e82ff1edf0c31035f5ac9da232b5fe.
Created attachment 192470 [details] [review] Bug 41624: Revert "Bug 35211: Fixed count on logged in holdings" This reverts commit 96c7eb3459770c354f59fcc1d4c22ebc4eb2a559.
Created attachment 192471 [details] [review] Bug 41624: Revert "Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames" This reverts commit 5c2b0fd49689b4bdaa392fc165a8fc97c1fafa1e.
Created attachment 192472 [details] [review] Bug 41624: Revert "Bug 35211: Separate group holdings into individual tabs" This reverts commit 08045c8009c52596d8df83e5da12d9e4e9abb9ae.
Created attachment 192473 [details] [review] Bug 41624: DB update to remove the pref
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>
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>
Squashed the reverted commits.
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>
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>
Push to main for 26.05.00. Thanks all!