Summary: | Remove GROUP BY clause in manage-marc-import.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Julian Maurice <julian.maurice> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Julian Maurice <julian.maurice> |
Severity: | normal | ||
Priority: | P5 - low | CC: | martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20144 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 17258, 20521 | ||
Attachments: |
Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl
Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl |
Description
Julian Maurice
2018-02-12 13:58:53 UTC
Created attachment 71472 [details] [review] Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl Fix for: 'koha_kohadev.me.frameworktext' isn't in GROUP BY t/db_dependent/www/search_utf8.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com> The GROUP BY is needed here, otherwise you have the same MARC framework displayed multiple times in the dropdown list. Created attachment 71625 [details] [review] Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl Replaced with a distinct. Fix for: 'koha_kohadev.me.frameworktext' isn't in GROUP BY t/db_dependent/www/search_utf8.t Comment on attachment 71625 [details] [review] Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl Review of attachment 71625 [details] [review]: ----------------------------------------------------------------- ::: tools/manage-marc-import.pl @@ +62,4 @@ > our $sessionID = $cookies{'CGISESSID'}->value; > our $dbh = C4::Context->dbh; > > +my $frameworks = Koha::BiblioFrameworks->search({ tagfield => { 'not' => undef } }, { join => 'marc_tag_structure', distinct => 'frameworkcode', order_by => ['frameworktext'] }); Ah! You need the join to confirm there are actually fields to be used for importing. Otherwise, you do lots of work to import nothing. Created attachment 73130 [details] [review] Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl Replaced with a distinct. Fix for: 'koha_kohadev.me.frameworktext' isn't in GROUP BY t/db_dependent/www/search_utf8.t NOTE: I added a [% frameworks.count %] into the template file, and compared master and a branch with this applied when managing a staged marc import. Values were identical. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 73860 [details] [review] Bug 20180: [sql_modes] Remove GROUP BY clause in manage-marc-import.pl Replaced with a distinct. Fix for: 'koha_kohadev.me.frameworktext' isn't in GROUP BY t/db_dependent/www/search_utf8.t NOTE: I added a [% frameworks.count %] into the template file, and compared master and a branch with this applied when managing a staged marc import. Values were identical. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Pushed to master for 18.05, thanks to everybody involved! |