Bugzilla – Attachment 63397 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.83 KB, created by
Marcel de Rooy
on 2017-05-12 05:41:16 UTC
(
hide
)
Description:
Bug 18579: Make EmbedItemsAvailability handle control fields correctly
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-05-12 05:41:16 UTC
Size:
1.83 KB
patch
obsolete
>From 00abfedf8de3d159ca8a7c81dee380a4f7b75dbb 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 >Content-Type: text/plain; charset=utf-8 > >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 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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.1.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