|
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! |