Bugzilla – Attachment 55486 Details for
Bug 7679
Add new filters to circulation statistics wizard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7679: Fix two SQL queries when using patron attributes
Bug-7679-Fix-two-SQL-queries-when-using-patron-att.patch (text/plain), 2.13 KB, created by
Julian Maurice
on 2016-09-12 07:15:00 UTC
(
hide
)
Description:
Bug 7679: Fix two SQL queries when using patron attributes
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2016-09-12 07:15:00 UTC
Size:
2.13 KB
patch
obsolete
>From 9dc89a84db7e5afd0e212cdcd9d6ac6d8854f269 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 19 Feb 2014 12:44:29 +0100 >Subject: [PATCH] Bug 7679: Fix two SQL queries when using patron attributes > >and remove some Perl warnings >--- > reports/issues_stats.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl >index 46fa03f..194c842 100755 >--- a/reports/issues_stats.pl >+++ b/reports/issues_stats.pl >@@ -318,8 +318,8 @@ sub calculate { > ( $linesource eq 'items' ) > ? " LEFT JOIN items ON (statistics.itemnumber = items.itemnumber) " > : " LEFT JOIN borrowers ON (statistics.borrowernumber = borrowers.borrowernumber) "; >+ $strsth .= " WHERE $line is not null "; > } >- $strsth .= " WHERE $line is not null "; > > if ( $line =~ /datetime/ ) { > if ( $linefilter[1] and ( $linefilter[0] ) ) { >@@ -406,8 +406,8 @@ sub calculate { > ( $colsource eq 'items' ) > ? "LEFT JOIN items ON (statistics.itemnumber = items.itemnumber) " > : "LEFT JOIN borrowers ON (statistics.borrowernumber = borrowers.borrowernumber) "; >+ $strsth2 .= " WHERE $column IS NOT NULL "; > } >- $strsth2 .= " WHERE $column IS NOT NULL "; > > if ( $column =~ /datetime/ ) { > if ( ( $colfilter[1] ) and ( $colfilter[0] ) ) { >@@ -606,7 +606,7 @@ sub calculate { > for my $col (@loopcol) { > my $total = 0; > foreach my $row (@looprow) { >- $total += table_get(\%table, $row->{rowtitle}, $col->{coltitle}); >+ $total += table_get(\%table, $row->{rowtitle}, $col->{coltitle}) || 0; > $debug and warn "value added " . table_get(\%table, $row->{rowtitle}, $col->{coltitle}) . "for line " . $row->{rowtitle}; > } > push @loopfooter, { 'totalcol' => $total }; >@@ -652,7 +652,7 @@ sub table_get { > sub table_inc { > my ($table, $row, $col, $inc) = @_; > >- $table->{ null_to_zzempty(lc($row)) }->{ null_to_zzempty(lc($col)) } += $inc; >+ $table->{ null_to_zzempty(lc($row // '')) }->{ null_to_zzempty(lc($col // '')) } += $inc; > } > > 1; >-- >2.1.4
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 7679
:
11479
|
13099
|
16242
|
16243
|
17798
|
22745
|
25053
|
25443
|
26531
|
31311
|
39250
|
39251
|
39252
|
39253
|
39254
|
39255
|
39256
|
39257
|
46184
|
46185
|
46186
|
46187
|
46188
|
46189
|
46190
|
46191
|
46192
|
46193
|
46194
|
46195
|
46196
|
46197
|
46198
|
46199
|
54598
|
54599
|
54600
|
54601
|
54602
|
54603
|
54604
|
54605
|
55481
|
55482
|
55483
|
55484
|
55485
|
55486
|
55487
|
55488
|
56877
|
56878
|
56879
|
56880
|
56881
|
56882
|
56883
|
56884
|
56885
|
56886
|
56887
|
56888