Bugzilla – Attachment 192466 Details for
Bug 41624
Revert Bug 35211
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41624: Revert "Bug 35211: Removed local items from group tabs and removed group items from other holdings tab"
Bug-41624-Revert-Bug-35211-Removed-local-items-fro.patch (text/plain), 4.03 KB, created by
Lucas Gass (lukeg)
on 2026-02-04 16:55:33 UTC
(
hide
)
Description:
Bug 41624: Revert "Bug 35211: Removed local items from group tabs and removed group items from other holdings tab"
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2026-02-04 16:55:33 UTC
Size:
4.03 KB
patch
obsolete
>From 7c5fe2be923390a3254abbfa177b5031c28cc799 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 4 Feb 2026 16:42:08 +0000 >Subject: [PATCH] Bug 41624: Revert "Bug 35211: Removed local items from group > tabs and removed group items from other holdings tab" > >This reverts commit 124c6c867065d4230ffa5553ca2b629e05b269a0. >--- > catalogue/detail.pl | 19 ++++++++++--------- > .../tables/items/catalogue_detail.inc | 4 +--- > 2 files changed, 11 insertions(+), 12 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 4115ae6c05c..b7b7c16d059 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -333,7 +333,13 @@ if ( defined $dat->{'itemtype'} ) { > $dat->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $dat->{itemtype} }->imageurl ); > } > >-my $total_group_holdings_count = 0; >+if ( C4::Context->preference('SeparateHoldings') ) { >+ my $SeparateHoldingsBranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch'; >+ my $other_holdings_count = >+ $items_to_display->search( { $SeparateHoldingsBranch => { '!=' => C4::Context->userenv->{branch} } } )->count; >+ $template->param( other_holdings_count => $other_holdings_count ); >+} >+ > if ( C4::Context->preference('SeparateHoldingsByGroup') ) { > my $branchcode = C4::Context->userenv->{branch}; > my @all_search_groups = Koha::Library::Groups->get_search_groups( { interface => 'staff' } ); >@@ -358,6 +364,9 @@ if ( C4::Context->preference('SeparateHoldingsByGroup') ) { > push @libs_branchcodes, $lib->branchcode; > } > >+ # Push logged in branchcode >+ push @libs_branchcodes, $branchcode; >+ > # Build group branchcode hash > $branchcode_hash{ $group->id } = \@libs_branchcodes; > >@@ -365,7 +374,6 @@ if ( C4::Context->preference('SeparateHoldingsByGroup') ) { > my $group_holdings_count = > $items_to_display->search( { $SeparateHoldingsBranch => { '-in' => \@libs_branchcodes } } )->count; > $holdings_count{ $group->id } = $group_holdings_count; >- $total_group_holdings_count += $group_holdings_count; > > push @lib_groups, $group; > } >@@ -380,13 +388,6 @@ if ( C4::Context->preference('SeparateHoldingsByGroup') ) { > ); > } > >-if ( C4::Context->preference('SeparateHoldings') ) { >- my $SeparateHoldingsBranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch'; >- my $other_holdings_count = >- $items_to_display->search( { $SeparateHoldingsBranch => { '!=' => C4::Context->userenv->{branch} } } )->count; >- $other_holdings_count -= $total_group_holdings_count; >- $template->param( other_holdings_count => $other_holdings_count ); >-} > $template->param( > count => $all_items->count, # FIXME 'count' is used in catalog-strings.inc > # But it's not a meaningful variable, we should rename it there >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >index 9ffce4036bd..5c25bff6d8d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc >@@ -328,9 +328,7 @@ > if ( tab_id == 'holdings' ) { > default_filters[branch] = '[% Branches.GetLoggedInBranchcode() | html %]'; > } else { >- let all_branchcodes = Object.values(branchcodes).flat(); >- all_branchcodes.push('[% Branches.GetLoggedInBranchcode() | html %]'); >- default_filters[branch] = { '-not_in' : all_branchcodes }; >+ default_filters[branch] = { '!=': '[% Branches.GetLoggedInBranchcode() | html %]' }; > } > [% END %] > >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41624
:
191470
|
191471
|
192464
|
192465
|
192466
|
192467
|
192468
|
192469
|
192470
|
192471
|
192472
|
192473
|
192724
|
192725
|
192785
|
192786