Bugzilla – Attachment 139491 Details for
Bug 25870
Add a q_ccl query parameter to /biblios
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25870 - (follow-up) Raw MARC-XML records from Zebra now get appropriate treatment
Bug-25870---follow-up-Raw-MARC-XML-records-from-Ze.patch (text/plain), 2.15 KB, created by
Paul Derscheid
on 2022-08-19 13:14:09 UTC
(
hide
)
Description:
Bug 25870 - (follow-up) Raw MARC-XML records from Zebra now get appropriate treatment
Filename:
MIME Type:
Creator:
Paul Derscheid
Created:
2022-08-19 13:14:09 UTC
Size:
2.15 KB
patch
obsolete
>From d0a42a0113b5f488a56c704bfcc985776865a3fb Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Fri, 19 Aug 2022 15:13:31 +0200 >Subject: [PATCH] Bug 25870 - (follow-up) Raw MARC-XML records from Zebra now > get appropriate treatment > >To test: >1) Apply the patch >2) Pick an endpoint tester of your choice, e.g. Insomnia or the ThunderClient if you use VSCode or derivatives. >3) Run a query while using Zebra. >4) Observe the marc-in-json response and check for validity. >5) Run a query while using Elasticsearch. >6) Again, observe the marc-in-json response and check for validity. >7) Not ready for sign-off but please leave a comment or help me on the Koha::Biblios->search thing. >--- > Koha/REST/V1/Biblios.pm | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) > >diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm >index 15e8e939ed..02f8af036b 100644 >--- a/Koha/REST/V1/Biblios.pm >+++ b/Koha/REST/V1/Biblios.pm >@@ -171,10 +171,16 @@ sub get_biblios_public { > my $patron = $c->stash('koha.user'); > my $is_public = $c->stash('is_public'); > my $opachiddenitems_rules = C4::Context->yaml_preference('OpacHiddenItems'); >- my @biblionumbers = map { $_->field('999')->subfield('c') } $results->@*; >+ my $searchengine = C4::Context->preference('SearchEngine'); >+ >+ my @biblionumbers >+ = $searchengine eq 'Zebra' >+ ? map { MARC::Record->new_from_xml( $_, 'UTF-8' )->field('999')->subfield('c') } $results->@* >+ : map { $_->field('999')->subfield('c') } $results->@*; > my @biblios = map { Koha::Biblios->find( { biblionumber => $_ } ) } @biblionumbers; > my @records = map { >- next if ( $is_public && !( $patron && $patron->category->override_hidden_items ) >+ next if ( $is_public >+ && !( $patron && $patron->category->override_hidden_items ) > && $_->hidden_in_opac( { rules => $opachiddenitems_rules } ) ); > $_->metadata->record; > } @biblios; >@@ -473,4 +479,4 @@ sub get_items_public { > }; > } > >-1; >\ No newline at end of file >+1; >-- >2.31.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25870
:
138123
|
139452
|
139469
|
139491
|
148117
|
148247
|
148446