Bugzilla – Attachment 192464 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: (QA follow-up) Fix counting"
Bug-41624-Revert-Bug-35211-QA-follow-up-Fix-counti.patch (text/plain), 4.44 KB, created by
Lucas Gass (lukeg)
on 2026-02-04 16:55:28 UTC
(
hide
)
Description:
Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting"
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2026-02-04 16:55:28 UTC
Size:
4.44 KB
patch
obsolete
>From 67f6340fd24a356522d27fc1cc6e26889f88b721 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 4 Feb 2026 16:41:24 +0000 >Subject: [PATCH] Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting" > >This reverts commit 97a022054db86f076844228e01e31e3aac045d9a. >--- > catalogue/detail.pl | 31 +++++++++---------- > .../prog/en/modules/catalogue/detail.tt | 4 +-- > 2 files changed, 16 insertions(+), 19 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 05a2d141402..4115ae6c05c 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -334,21 +334,6 @@ if ( defined $dat->{'itemtype'} ) { > } > > my $total_group_holdings_count = 0; >-my $other_holdings_count = 0; >-my $branch_holdings_count = 0; >-if ( C4::Context->preference('SeparateHoldings') ) { >- my $SeparateHoldingsBranch = C4::Context->preference('SeparateHoldingsBranch') || 'homebranch'; >- $branch_holdings_count = >- $items_to_display->search( { $SeparateHoldingsBranch => { '=' => C4::Context->userenv->{branch} } } )->count; >- $other_holdings_count = $items_to_display->count - $branch_holdings_count; >-} >-$template->param( >- count => $all_items->count, # FIXME 'count' is used in catalog-strings.inc >- other_holdings_count => $other_holdings_count, # But it's not a meaningful variable, we should rename it there >- all_items_count => $all_items->count, >- items_to_display_count => $items_to_display->count, >- branch_holdings_count => $branch_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' } ); >@@ -383,7 +368,6 @@ if ( C4::Context->preference('SeparateHoldingsByGroup') ) { > $total_group_holdings_count += $group_holdings_count; > > push @lib_groups, $group; >- $other_holdings_count = ( $items_to_display->count ) - $total_group_holdings_count; > } > } > } >@@ -393,10 +377,23 @@ if ( C4::Context->preference('SeparateHoldingsByGroup') ) { > branchcodes => \%branchcode_hash, > holdings_count_hash => \%holdings_count, > total_group_holdings_count => $total_group_holdings_count, >- other_holdings_count => $other_holdings_count, > ); > } > >+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 >+ all_items_count => $all_items->count, >+ items_to_display_count => $items_to_display->count, >+); >+ > my $some_private_shelves = Koha::Virtualshelves->get_some_shelves( > { > borrowernumber => $borrowernumber, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index 591800e408d..48c85790537 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -335,9 +335,9 @@ > [% WRAPPER tabs id= "bibliodetails" %] > [% WRAPPER tabs_nav %] > [% IF Koha.Preference('SeparateHoldings') %] >- [% IF branch_holdings_count %] >+ [% IF items_to_display_count - ( other_holdings_count || 0 ) - ( total_group_holdings_count || 0 ) %] > [% WRAPPER tab_item tabname= "holdings" %] >- <span>[% Branches.GetLoggedInBranchname | html %] holdings ([% branch_holdings_count | html %])</span> >+ <span>[% Branches.GetLoggedInBranchname | html %] holdings ([% items_to_display_count - ( other_holdings_count || 0 ) - ( total_group_holdings_count || 0 ) - ( hidden_count || 0 ) || 0 | html %])</span> > [% END %] > [% END %] > [% ELSE %] >-- >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