Bug 31578 - "Patrons who haven't checked out" report broken with SQL strict mode enabled
Summary: "Patrons who haven't checked out" report broken with SQL strict mode enabled
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: master
Hardware: All All
: P1 - high normal (vote)
Assignee: Bugs List
QA Contact: Testopia
Depends on:
Blocks: 17258
  Show dependency treegraph
Reported: 2022-09-19 00:53 UTC by Victor Grousset/tuxayo
Modified: 2022-11-07 01:51 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Note You need to log in before you can comment on or make changes to this bug.
Description Victor Grousset/tuxayo 2022-09-19 00:53:45 UTC
== test plan ==
1) Activate IndependentBranches, IndependentBranchesPatronModifications and IndependentBranchesTransfers
2) Create a staff user with limited permissions (NOT a superlibrarian), including reports permissions. Here are mine as an example
  - circulate (all)
  - catalogue
  - borrowers
    - delete_borrowers
    - edit_borrowers
  - reserveforothers (all)
  - reports (all)
3) Create (or make sure you already have) a patron in another branch (if using an existing patron, make sure they have no checkouts or checkout history)
4) Log in as your limited staff patron
5) Go to Reports > Inactive > Patrons who haven't checked out
6) "CGI::Compile::ROOT::kohadevbox_koha_reports_borrowers_out_2epl::calculate(): DBI Exception: DBD::mysql::st execute failed: 'koha_axelle.borrowers.surname' isn't in GROUP BY at /kohadevbox/koha/reports/borrowers_out.pl line 60

This has been found on bug 28967 comment 4 I don't know how much of the preparation steps are necessary.
Comment 1 Victor Grousset/tuxayo 2022-09-19 00:55:38 UTC
Not sure about the severity, I'm assuming the report isn't used much. Maybe it should be "normal" though.
Comment 2 David Nind 2022-11-07 01:51:24 UTC
Just adding a note, following testing of another bug.

Link title and page title are different:
- Link to report on reports page: Patrons who haven't checked out
- Title of page when clicked through: Patrons with no checkouts

I think for consistency, these should be the same.

I have also bumped up to normal as I think something that is clearly linked to and doesn't work is more than a minor bug.