Summary: | get_marc_components and get_marc_volumes should be more consistent | ||
---|---|---|---|
Product: | Koha | Reporter: | Martin Renvoize (ashimema) <martin.renvoize> |
Component: | Architecture, internals, and plumbing | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | Failed QA --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | david, katrin.fischer, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 35099 | ||
Bug Blocks: | |||
Attachments: |
Bug 35117: Improve consistency
Bug 35117: Improve consistency |
Description
Martin Renvoize (ashimema)
2023-10-20 13:30:17 UTC
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 ? |