[Bug 20177] New: Remove GROUP BY clause in GetCourses
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Bug ID: 20177 Summary: Remove GROUP BY clause in GetCourses Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@bugs.koha-community.org Reporter: julian.maurice@biblibre.com QA Contact: julian.maurice@biblibre.com Blocks: 17258 This bug is a continuation of bug 20144 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17258 [Bug 17258] [OMNIBUS] MySQL 5.7 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 71468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71468&action=edit Bug 20177: [sql_modes] Remove GROUP BY clause in GetCourses Fix for: 'koha_kohadev.courses.department' isn't in GROUP BY t/db_dependent/CourseReserves.t no need to group by here Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #2 from Julian Maurice <julian.maurice@biblibre.com> --- The GROUP BY is needed here. Otherwise you can see the same course multiple times in /cgi-bin/koha/course_reserves/course-reserves.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 --- Comment #3 from Julian Maurice <julian.maurice@biblibre.com> --- But maybe the joins are useless ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71468|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 71620 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71620&action=edit Bug 20177: [sql_modes] Fix GROUP BY clause in GetCourses Fix for: 'koha_kohadev.courses.department' isn't in GROUP BY t/db_dependent/CourseReserves.t A better fix would be to remove the joins and only return values from the courses table. But more work is needed to acchieve that goal. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_18_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |20521 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20521 [Bug 20521] dev installations should run with problematic SQL modes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Julian Maurice from comment #3)
But maybe the joins are useless ?
I'm thinking the idea was to let courses exist, but if there are no reserves or items, then why list the course? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Jonathan Druart from comment #4)
A better fix would be to remove the joins and only return values from the courses table. But more work is needed to acchieve that goal.
This sub is only used in one place. What "more work" is needed? A refactor to Objects? The GROUP BY and JOINs make no sense in the one template it is used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- It's also called from GetCourseReserves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- How can I trigger the bug ?
mysql> SELECT @@SQL_MODE; ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION But no errors on master while creating/editing courses and course reserves
prove t/db_dependent/CourseReserves.t pass on master too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Julian Maurice from comment #8)
How can I trigger the bug ?
mysql> SELECT @@SQL_MODE; ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION But no errors on master while creating/editing courses and course reserves
prove t/db_dependent/CourseReserves.t pass on master too.
Yes, since bug 20229 is pushed, the sql mode are set for the connection. Try with bug 20521 applied. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_18_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #71620|0 |1 is obsolete| | --- Comment #10 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 79405 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=79405&action=edit Bug 20177: [sql_modes] Fix GROUP BY clause in GetCourses Fix for: 'koha_kohadev.courses.department' isn't in GROUP BY t/db_dependent/CourseReserves.t A better fix would be to remove the joins and only return values from the courses table. But more work is needed to acchieve that goal. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Test passes and the behavior of Course reserves appears to be unchanged -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79405|0 |1 is obsolete| | --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 80080 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=80080&action=edit Bug 20177: [sql_modes] Fix GROUP BY clause in GetCourses Fix for: 'koha_kohadev.courses.department' isn't in GROUP BY t/db_dependent/CourseReserves.t A better fix would be to remove the joins and only return values from the courses table. But more work is needed to acchieve that goal. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Test passes and the behavior of Course reserves appears to be unchanged Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |Pushed to Stable --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20177 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org