Bugzilla – Attachment 139052 Details for
Bug 31276
Report results are limited to 999,999 no matter the actual number of results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31276: Report results are limited to 999,999 no matter the actual number of results
Bug-31276-Report-results-are-limited-to-999999-no-.patch (text/plain), 3.02 KB, created by
Martin Renvoize
on 2022-08-12 13:34:45 UTC
(
hide
)
Description:
Bug 31276: Report results are limited to 999,999 no matter the actual number of results
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2022-08-12 13:34:45 UTC
Size:
3.02 KB
patch
obsolete
>From bb892d9f894900d510885826515d535ebc80fff4 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Mon, 1 Aug 2022 10:47:04 -0400 >Subject: [PATCH] Bug 31276: Report results are limited to 999,999 no matter > the actual number of results > >In Koha, any report that uses C4::Reports::Guided will be limited to 999,999 rows. This is causing problems for larger libraries where some reports may have over a million results. > >Test Plan: >1) Create a report "SELECT * FROM borrowers" and run it, note the number > of results >2) Apply this patch >3) Add the line `<report_results_limit>3</report_results_limit>` > within the <config> block of your koha-conf.xml >4) Restart all the things! >5) Run the report, download the results as a CSV >6) Note your CSV only has 4 lines, the header and 3 patrons > >Signed-off-by: Rachael Laritz <rachael.laritz@inlibro.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Reports/Guided.pm | 2 +- > debian/templates/koha-conf-site.xml.in | 4 ++++ > etc/koha-conf.xml | 4 ++++ > 3 files changed, 9 insertions(+), 1 deletion(-) > >diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm >index 2d29b2138e..b6d58955c3 100644 >--- a/C4/Reports/Guided.pm >+++ b/C4/Reports/Guided.pm >@@ -559,7 +559,7 @@ sub execute_query { > my $params = shift; > my $sql = $params->{sql}; > my $offset = $params->{offset} || 0; >- my $limit = $params->{limit} || 999999; >+ my $limit = $params->{limit} || C4::Context->config('report_results_limit') || 999999; > my $sql_params = defined $params->{sql_params} ? $params->{sql_params} : []; > my $report_id = $params->{report_id}; > >diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in >index 2e66535c00..29b378bc70 100644 >--- a/debian/templates/koha-conf-site.xml.in >+++ b/debian/templates/koha-conf-site.xml.in >@@ -304,6 +304,10 @@ __END_SRU_PUBLICSERVER__ > <!-- Secret passphrase used by Mojolicious for signed cookies --> > <api_secret_passphrase>__API_SECRET__</api_secret_passphrase> > >+ <!-- default report results limit is 999,999. uncomment this and set a different number to override that limit. >+ <report_results_limit>999999</report_results_limit> >+ --> >+ > <!-- Accessible directory from the staff interface, uncomment the following line and define a valid path to let the intranet user access it--> > <!-- > <access_dirs> >diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml >index 6c2c1fe923..0d0c50ea24 100644 >--- a/etc/koha-conf.xml >+++ b/etc/koha-conf.xml >@@ -121,6 +121,10 @@ > <!-- Secret passphrase used by Mojolicious for signed cookies --> > <api_secret_passphrase>CHANGEME</api_secret_passphrase> > >+ <!-- default report results limit is 999,999. uncomment this and set a different number to override that limit. >+ <report_results_limit>999999</report_results_limit> >+ --> >+ > <!-- Accessible directory from the staff client, uncomment the following line and define a valid path to let the intranet user access it--> > <!-- > <access_dirs> >-- >2.20.1
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 31276
:
138477
|
138915
| 139052