Bugzilla – Attachment 91455 Details for
Bug 21027
Totals in statistics tab change when StatisticsFields is changed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21027; Fix checkout statistics if 1+ of the fields is not defined
Bug-21027-Fix-checkout-statistics-if-1-of-the-fiel.patch (text/plain), 1.52 KB, created by
Chris Cormack
on 2019-07-11 06:22:11 UTC
(
hide
)
Description:
Bug 21027; Fix checkout statistics if 1+ of the fields is not defined
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2019-07-11 06:22:11 UTC
Size:
1.52 KB
patch
obsolete
>From e284ab8b3c18983e5d5d4e03f58e38debb5686a7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sun, 28 Apr 2019 20:55:02 -0400 >Subject: [PATCH] Bug 21027; Fix checkout statistics if 1+ of the fields is not > defined > >TEST > >- Use a patron who hasn't checked out items before >- Set StatisticsFields to itype|ccode >- Check out some items without location >- Verify that statistics stable shows the correct number of checkouts >- Check out one item with a location or just change one of your checked out items >- Verify the total is still correct >- Change StatisticsFields to location|itype|ccode >- Verify the total has changed now - it's only 1 (the one with a location) > >Apply the patch and try again > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > members/statistics.pl | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/members/statistics.pl b/members/statistics.pl >index 61c42f9c34..ba453453c6 100755 >--- a/members/statistics.pl >+++ b/members/statistics.pl >@@ -198,7 +198,10 @@ sub merge { > for my $ch ( @r ) { > $exists = 1; > for my $cn ( @statistic_column_names ) { >- if ( $ch->{$cn} and not $ch->{$cn} eq $h->{$cn} ) { >+ if ( ( not defined $ch->{$cn} && defined $h->{$cn} ) >+ || ( defined $ch->{$cn} && not defined $h->{$cn} ) >+ || ( $ch->{$cn} ne $h->{$cn} ) ) >+ { > $exists = 0; > last; > } >-- >2.11.0
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 21027
:
76874
|
76875
|
88990
|
89008
|
91455
|
91472