Bugzilla – Attachment 11181 Details for
Bug 8503
Software error n edit items with EasyAnalyticalRecords
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8503: Software error in edit items with EasyAnalyticalRecords
Bug-8503-Software-error-in-edit-items-with-EasyAna.patch (text/plain), 1.95 KB, created by
Jared Camins-Esakov
on 2012-07-28 13:23:06 UTC
(
hide
)
Description:
Bug 8503: Software error in edit items with EasyAnalyticalRecords
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-07-28 13:23:06 UTC
Size:
1.95 KB
patch
obsolete
>From 828b286bb29191d7e9a1c7b9369b979452bb04a5 Mon Sep 17 00:00:00 2001 >From: Fridolyn SOMERS <fridolyn.somers@biblibre.com> >Date: Wed, 25 Jul 2012 14:11:08 +0200 >Subject: [PATCH] Bug 8503: Software error in edit items with EasyAnalyticalRecords >Content-Type: text/plain; charset="UTF-8" > >Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> >Solves software error when editing items for record with invalid >analytic. >--- > cataloguing/additem.pl | 17 ++++++++++------- > 1 files changed, 10 insertions(+), 7 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index 8543297..684e6f6 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -564,13 +564,16 @@ if ( C4::Context->preference('EasyAnalyticalRecords') ) { > $analyticfield = '461'; > } > foreach my $hostfield ($temp->field($analyticfield)){ >- if ($hostfield->subfield('0')){ >- my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1); >- my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostfield->subfield('0')) ); >- foreach my $hostitem ($hostrecord->field($itemfield)){ >- if ($hostitem->subfield('9') eq $hostfield->subfield('9')){ >- push (@fields, $hostitem); >- push (@hostitemnumbers, $hostfield->subfield('9')); >+ my $hostbiblionumber = $hostfield->subfield('0'); >+ if ($hostbiblionumber){ >+ my $hostrecord = GetMarcBiblio($hostbiblionumber, 1); >+ if ($hostrecord) { >+ my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostbiblionumber) ); >+ foreach my $hostitem ($hostrecord->field($itemfield)){ >+ if ($hostitem->subfield('9') eq $hostfield->subfield('9')){ >+ push (@fields, $hostitem); >+ push (@hostitemnumbers, $hostfield->subfield('9')); >+ } > } > } > } >-- >1.7.2.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 8503
:
11125
| 11181