Bugzilla – Attachment 63390 Details for
Bug 18579
Problem with :Filter::MARC::EmbedItemsAvailability
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18579: Make EmbedItemsAvailability handle control fields correctly
Bug-18579-Make-EmbedItemsAvailability-handle-contr.patch (text/plain), 1.68 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-05-11 16:10:46 UTC
(
hide
)
Description:
Bug 18579: Make EmbedItemsAvailability handle control fields correctly
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-05-11 16:10:46 UTC
Size:
1.68 KB
patch
obsolete
>From 78cd94148b2b537b158ae8afc5f633cb894f764f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 11 May 2017 13:07:37 -0300 >Subject: [PATCH] Bug 18579: Make EmbedItemsAvailability handle control fields > correctly > >This patch makes the EmbedItemsAvailability filter handle the biblio.biblionumber > control field mapping gracefully. >Right now, it was assuming a regular data field was used, and such is not the case for UNIMARC (001). > >To test: >- Apply the tests patch >- Run: > $ sudo koha-shell kohadev > k$ cd kohaclone > k$ prove t/db_dependent/Koha/Filter/EmbedItemsAvailability.t >=> FAIL: Tests fail to run >- Apply this patch >- Run: > k$ prove t/db_dependent/Koha/Filter/EmbedItemsAvailability.t >=> SUCCESS: Tests pass! >- Sign off :-D > >Sponsored-by: ByWater Solutions >--- > Koha/Filter/MARC/EmbedItemsAvailability.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/Koha/Filter/MARC/EmbedItemsAvailability.pm b/Koha/Filter/MARC/EmbedItemsAvailability.pm >index 2f23036..e42ba02 100644 >--- a/Koha/Filter/MARC/EmbedItemsAvailability.pm >+++ b/Koha/Filter/MARC/EmbedItemsAvailability.pm >@@ -72,7 +72,9 @@ sub _processrecord { > my $record = shift; > > my ($biblionumber_field, $biblionumber_subfield) = GetMarcFromKohaField("biblio.biblionumber", ''); >- my $biblionumber = $record->field($biblionumber_field)->subfield($biblionumber_subfield); >+ my $biblionumber = ( $biblionumber_field > 9 ) >+ ? $record->field($biblionumber_field)->subfield($biblionumber_subfield) >+ : $record->field($biblionumber_field)->data(); > > my $not_onloan_items = Koha::Items->search({ > biblionumber => $biblionumber, >-- >2.7.4
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 18579
:
63389
|
63390
|
63394
|
63395
|
63396
|
63397
|
63414
|
63415