Bug 25335 - Use of an authorised value in a marc subfield causes strict mode SQL error
Summary: Use of an authorised value in a marc subfield causes strict mode SQL error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Andrew Fuerste-Henry
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 17258
  Show dependency treegraph
 
Reported: 2020-04-30 19:33 UTC by Andrew Fuerste-Henry
Modified: 2021-12-13 21:09 UTC (History)
3 users (show)

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


Attachments
Bug 25335: group by authorised_value in addbiblio.pl (1.47 KB, patch)
2020-04-30 19:38 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 25335: group by authorised_value in addbiblio.pl (1.51 KB, patch)
2020-05-01 11:48 UTC, David Nind
Details | Diff | Splinter Review
Bug 25335: group by authorised_value in addbiblio.pl (1.57 KB, patch)
2020-05-03 20:56 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2020-04-30 19:33:25 UTC
To recreate:
- Edit your default framework, connect any subfield outside of the 952 to an authorised value (for example, connect the 942$n to the Yes_No auth value)
- Find a record in that framework
- Edit the record and find your subfield
- The subfield shows a dropdown with no contents
- check plack log, see "DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_value' isn't in GROUP BY "
Comment 1 Andrew Fuerste-Henry 2020-04-30 19:38:25 UTC
Created attachment 104051 [details] [review]
Bug 25335: group by authorised_value in addbiblio.pl

To Test:
1- Edit your default framework, connect any subfield outside of the 952 to an authorised value (for example, connect the 942$n to the Yes_No auth value)
2 - Find a record in that framework
3 - Edit the record and find your subfield
4 - The subfield shows a dropdown with no contents
5 - check plack log, see "DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_value' isn't in GROUP BY "
6 - apply patch, restart all
7 - reload edit record page, see your auth value dropdown has contents
Comment 2 David Nind 2020-05-01 11:48:35 UTC
Created attachment 104077 [details] [review]
Bug 25335: group by authorised_value in addbiblio.pl

To Test:
1- Edit your default framework, connect any subfield outside of the 952 to an authorised value (for example, connect the 942$n to the Yes_No auth value)
2 - Find a record in that framework
3 - Edit the record and find your subfield
4 - The subfield shows a dropdown with no contents
5 - check plack error log, see "DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_value' isn't in GROUP BY "
6 - apply patch, restart all
7 - reload edit record page, see your auth value dropdown has contents

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2020-05-03 20:56:23 UTC
Created attachment 104231 [details] [review]
Bug 25335: group by authorised_value in addbiblio.pl

To Test:
1- Edit your default framework, connect any subfield outside of the 952 to an authorised value (for example, connect the 942$n to the Yes_No auth value)
2 - Find a record in that framework
3 - Edit the record and find your subfield
4 - The subfield shows a dropdown with no contents
5 - check plack log, see "DBD::mysql::st execute failed: 'koha_kohadev.authorised_values.authorised_value' isn't in GROUP BY "
6 - apply patch, restart all
7 - reload edit record page, see your auth value dropdown has contents

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2020-05-03 20:56:38 UTC
Good catch!
Comment 5 Martin Renvoize 2020-05-04 07:55:37 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 6 Joy Nelson 2020-05-11 20:35:52 UTC
Backported to 19.11.x for 19.11.06
Comment 7 Lucas Gass 2020-05-15 20:04:26 UTC
backported to 19.05.x for 19.05.11