Bugzilla – Attachment 185617 Details for
Bug 40622
Bug 38233 not properly applied to 24.11.x, 25.05.x, and main
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40622: Use OPAC MARCXML for ILS-DI GetRecords
Bug-40622-Use-OPAC-MARCXML-for-ILS-DI-GetRecords.patch (text/plain), 2.88 KB, created by
David Cook
on 2025-08-21 04:01:07 UTC
(
hide
)
Description:
Bug 40622: Use OPAC MARCXML for ILS-DI GetRecords
Filename:
MIME Type:
Creator:
David Cook
Created:
2025-08-21 04:01:07 UTC
Size:
2.88 KB
patch
obsolete
>From d146420bffe46cc0840538947a842a86c81172ca Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 21 Aug 2025 01:34:49 +0000 >Subject: [PATCH] Bug 40622: Use OPAC MARCXML for ILS-DI GetRecords > >This change makes it so that the ILS-DI GetRecords output for >"marcxml" will contain the OPAC version of the record. > >Test plan: >0. Apply the patches >1. prove t/db_dependent/ILSDI_Services.t >2. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29 >3. Click "Settings" to change the framework to Default, and click "Save" >4. Go to http://localhost:8081/cgi-bin/koha/admin/marc_subfields_structure.pl >?op=add_form&tagfield=245&tagsubfield=a&frameworkcode=#subafield >5. Untick the "OPAC" box and click "Save changes" >6. Go to system preferences >7. Change "ILS-DI" to "Enable" >8. Change "ILS-DI:AuthorizedIPs" to 0.0.0.0/0 >9. Go to http://localhost:8080/cgi-bin/koha/ilsdi.pl?service=GetRecords&id=29 >10. Note that you cannot see the title in the MARCXML. >--- > t/db_dependent/ILSDI_Services.t | 22 ++++++++++++++++++++-- > 1 file changed, 20 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index e439df02ba..160df7803b 100755 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -34,6 +34,8 @@ use C4::Reserves qw (AddReserve ModReserve ModReserveAffect ModReserveStatus) > use Koha::AuthUtils; > use Koha::DateUtils qw( dt_from_string ); > >+use Koha::MarcSubfieldStructures; >+ > BEGIN { > use_ok( > 'C4::ILSDI::Services', >@@ -800,7 +802,7 @@ subtest 'Holds test with start_date and end_date' => sub { > > subtest 'GetRecords' => sub { > >- plan tests => 10; >+ plan tests => 11; > > $schema->storage->txn_begin; > >@@ -817,12 +819,24 @@ subtest 'GetRecords' => sub { > } > ); > >+ my $biblio = $builder->build_sample_biblio( >+ { >+ title => 'This is an awesome title', >+ } >+ ); >+ > my $item = $builder->build_sample_item( > { >- library => $branch1->{branchcode}, >+ biblionumber => $biblio->biblionumber, >+ library => $branch1->{branchcode}, > } > ); > >+ my $framework_f245a = Koha::MarcSubfieldStructures->find( >+ { frameworkcode => $biblio->frameworkcode, tagfield => "245", tagsubfield => "a" } ); >+ $framework_f245a->hidden('8'); >+ $framework_f245a->store(); >+ > my $patron = $builder->build( > { > source => 'Borrower', >@@ -855,6 +869,10 @@ subtest 'GetRecords' => sub { > > my $reply = C4::ILSDI::Services::GetRecords($cgi); > >+ my $opac_marcxml = $reply->{record}->[0]->{marcxml}; >+ my @title_matches = ( $opac_marcxml =~ m/This is an awesome title/g ); >+ is( scalar @title_matches, 0, 'Title hidden in output as expected' ); >+ > my $transfer = $item->get_transfer; > my $expected = { > datesent => $transfer->datesent, >-- >2.39.5
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 40622
:
185262
|
185617
|
186000
|
186001