https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15870 --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Comment on attachment 48814 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48814 [SIGNED-OFF]Bug 15870: Follow-up of filter and tests Review of attachment 48814: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=15870&attachment=48814) ----------------------------------------------------------------- ::: t/db_dependent/Filter_MARC_ViewPolicy.t @@ +33,2 @@
use Koha::Database; +use English qw/-no_match_vars/;
You are not using regex, it's not needed. @@ +33,4 @@
use Koha::Database; +use English qw/-no_match_vars/; + +$OUTPUT_AUTOFLUSH = 1;
This is not used later. @@ +66,2 @@
+ $schema->storage->txn_begin();
I'd suggest to begin/rollback the transaction in the subtests. @@ +69,5 @@
+ my $update_sql = + q{UPDATE marc_subfield_structure SET hidden=? } + . q{WHERE tagfield='020' OR } + . q{ tagfield='008';}; + my $sth = $dbh->prepare($update_sql);
prepare should be outside of the loop, otherwise there are no needs to prepare it :) @@ +100,2 @@
# Data fields + if ( any { $_ == $hidden_value } @{ $hidden->{$interface} } ) {
You could have used grep, but does not really matter. @@ +152,5 @@
+ my @fields = ( + MARC::Field->new( '003', 'AR-CdUBM' ), + MARC::Field->new( '008', '######suuuu####ag_||||__||||_0||_|_uuu|d' ), + MARC::Field->new( '020', q{}, q{}, 'a' => $isbn ), + MARC::Field->new( '245', q{}, q{}, 'a' => $title ),
Would be good to make it marcflavour independent, but not a requirement yet. -- You are receiving this mail because: You are watching all bug changes.