Bug 35099 highlighted a number of inconsistencies between these two parallel methods.. we should bring them closer.
Created attachment 157516 [details] [review] Bug 35117: Improve consistency This patch improves the consistency between get_components_query and get_get_volumes_query methods so they both check for MARC21. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
No real test plan as such.. just brings a little more consistency between these two parallel/similar sets of code.
Created attachment 167327 [details] [review] Bug 35117: Improve consistency This patch improves the consistency between get_components_query and get_get_volumes_query methods so they both check for MARC21. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: David Nind <david@davidnind.com>
I have no idea about the actual code, but the patch still applies and all the tests pass. prove t/* ..... All tests successful. Files=200, Tests=9395, 497 wallclock secs ( 1.81 usr 0.39 sys + 1068.18 cusr 200.62 csys = 1271.00 CPU) Result: PASS
I can't for the life of me remember what I was doing here at this point :(.
(In reply to Martin Renvoize from comment #5) > I can't for the life of me remember what I was doing here at this point :(. LOL
What about 001 not found when pref enabled? if ( C4::Context->preference('UseControlNumber') ) { my $pf001 = $marc->field('001') || undef; Then you go to: my ( $error, $query, $query_str ) = $builder->build_query_compat( undef, [$searchstr], undef, undef, [$sort], 0 ); while $searchstr is undefined.. We should probably not look for [ undef ] ? In that unusual case, we should be looking for the title, right? So the 001 defined test should go to the toplevel if ?