Main Koha release repository https://koha-community.org
Find a file
Michael Hafen 82a66155fb Bug 28977: Fix cat_issues_top.pl report with strict SQL modes
To get the 'Most circulated items' report to run in ONLY_FULL_GROUP_BY
Sql mode.

Test plan:

Turn on strict_sql_modes ( make sure <strict_sql_modes> is 1 in KOHA_CONF )
Go to Reports -> Most circulated items
submit the form.

Without the patch you get an error like:
CGI::Compile::ROOT::usr_local_koha_master_reports_cat_issues_top_2epl::calculate(): DBI Exception: DBD::mysql::st execute failed: Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'koha_main_v4.items.itemcallnumber' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by [for Statement "SELECT DISTINCT biblio.title, COUNT(biblio.biblionumber) AS `RANK`, biblio.biblionumber AS ID, itemcallnumber as CALLNUM, ccode as CCODE, location as LOC FROM `old_issues`
                  LEFT JOIN items USING(itemnumber)
                  LEFT JOIN biblio USING(biblionumber)
                  LEFT JOIN biblioitems USING(biblionumber)
                  LEFT JOIN borrowers USING(borrowernumber)
                  WHERE 1 AND old_issues.issuedate > '2020-08-03' AND old_issues.issuedate < '2021-05-17' AND old_issues.returndate > '2020-08-27' AND old_issues.returndate < '2021-06-01' AND old_issues.branchcode like '403' AND items.itype like 'F' AND ccode like 'FIC' AND borrowers.categorycode like 'ST' group by biblio.biblionumber order by `RANK` DESC"] at /usr/local/koha_master/reports/cat_issues_top.pl line 67
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77

With the patch you will see the report results view.

Signed-off-by: David Nind <david@davidnind.com>

JD Amended patch - adjust commit's title

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-09 22:01:36 -10:00
acqui Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
admin Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
api Bug 29772: (follow-up) Document error codes 2022-01-05 13:33:46 -10:00
authorities
basket Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
bin
C4 Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
catalogue Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
cataloguing Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
circ Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
clubs Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
course_reserves
debian Bug 29881: libdbd-sqlite2-perl is unavailable on deb12 (koha-common wont install) 2022-02-09 15:36:24 -10:00
docs Revert "Bug 20076: Add Thibaud Guillot to contributors" 2022-01-13 22:12:53 -10:00
errors
etc Bug 18540: Update MARC21 biblio XSL file 2022-01-18 21:15:04 -10:00
ill Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
installer Bug 29943: DBRev 21.12.00.015 2022-02-01 21:39:39 -10:00
Koha Bug 29859: (QA follow-up) Minor typo correction 2022-02-09 15:36:24 -10:00
koha-tmpl Bug 11873: Compiled CSS 2022-02-09 15:36:24 -10:00
labels
lib/CGI/Session/Serialize
members Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
misc Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
offline_circ Bug 29255: Built-in offline circulation broken with SQL error 2021-11-15 12:38:39 +01:00
opac Bug 30045: (bug 29543 follow-up) Fix SCO print slip 2022-02-09 15:36:24 -10:00
patron_lists
patroncards Bug 18320: Remove calls to CGI->param from the templates in patron cards 2022-01-19 12:13:49 -10:00
plugins
pos
reports Bug 28977: Fix cat_issues_top.pl report with strict SQL modes 2022-02-09 22:01:36 -10:00
reserve Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
reviews
rotating_collections
serials Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
services
skel
suggestion Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
svc
t Bug 29847: Make Koha::Patron::HouseboundProfile->housebound_visits return a resultset 2022-02-09 15:36:23 -10:00
tags
tmp/modified_authorities
tools Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
virtualshelves Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
xt Bug 28617: (QA follow-up) Restore FindBin in two places 2021-12-07 12:16:28 -10:00
.editorconfig
.eslintrc.json
.gitignore
.htaccess Fix file permissions: if it is not a script, it should not be executable. 2010-04-16 00:40:34 -04:00
.mailmap
.perlcriticrc
.proverc.dist
.scss-lint.yml
about.pl
app.psgi
changelanguage.pl
cpanfile Bug 29543: Add Mojo::JWT dependency 2022-02-02 21:05:29 -10:00
fix-perl-path.PL
gulpfile.js
help.pl
INSTALL
Koha.pm Bug 29943: DBRev 21.12.00.015 2022-02-01 21:39:39 -10:00
koha_perl_deps.pl
kohaversion.pl
LICENSE
mainpage.pl
Makefile.PL
MANIFEST.SKIP
package.json
README Bug 9440 - update Koha's LICENSE file from GPL2 to GPL3 2013-02-12 08:52:10 -05:00
README.md
README.robots
rewrite-config.PL
yarn.lock

Koha is a free software integrated library system (ILS).

Koha is distributed under the GNU GPL version 3 or later.

Note: Koha does not accept pull requests from git hosting sites.

Note: This project has its own bug tracker, to report a bug or submit a patch visit http://bugs.koha-community.org.

For guidelines on submitting patches for Koha please visit https://wiki.koha-community.org/wiki/SubmitingAPatch

The developers handbook can be found at https://wiki.koha-community.org/wiki/Developer_handbook

http://koha-community.org/

Koha Logo