Bugzilla – Attachment 73488 Details for
Bug 15239
Add multiple items fail on barcode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug15239: feed branch to Barcode constructor, in case of hbyymmincr
Bug15239-feed-branch-to-Barcode-constructor-in-cas.patch (text/plain), 2.05 KB, created by
Charles Farmer
on 2018-03-30 14:18:38 UTC
(
hide
)
Description:
Bug15239: feed branch to Barcode constructor, in case of hbyymmincr
Filename:
MIME Type:
Creator:
Charles Farmer
Created:
2018-03-30 14:18:38 UTC
Size:
2.05 KB
patch
obsolete
>From 6f1f8790e7b0b8297e72dba4bde7ed4252218033 Mon Sep 17 00:00:00 2001 >From: Charles Farmer <charles.farmer@inLibro.com> >Date: Fri, 30 Mar 2018 10:18:09 -0400 >Subject: [PATCH] Bug15239: feed branch to Barcode constructor, in case of > hbyymmincr > >--- > cataloguing/additem.pl | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl >index a6aa25c..6d5e8be 100755 >--- a/cataloguing/additem.pl >+++ b/cataloguing/additem.pl >@@ -439,6 +439,9 @@ if ($prefillitem) { > } > } > >+#---- finds where items.homebranch is stored >+my ($branchtagfield, $branchtagsubfield) = &GetMarcFromKohaField("items.homebranch", $frameworkcode); >+ > #------------------------------------------------------------------------------- > if ($op eq "additem") { > >@@ -527,9 +530,18 @@ if ($op eq "additem") { > if ($add_multiple_copies_submit) { > > use C4::Barcodes; >- my $barcodeobj = C4::Barcodes->new; > my $oldbarcode = $addedolditem->{'barcode'}; > my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode); >+ my $barcodeobj; >+ if ( C4::Context->preference('autoBarcode') eq 'hbyymmincr' ) { >+ my $record_branch = >+ $record >+ ->field($branchtagfield) >+ ->subfield($branchtagsubfield); >+ $barcodeobj = C4::Barcodes->new('hbyymmincr', $record_branch); >+ } else { >+ $barcodeobj = C4::Barcodes->new(); >+ } > > # If there is a barcode and we can't find their new values, we can't add multiple copies > my $testbarcode; >@@ -733,7 +745,6 @@ my %witness; #---- stores the list of subfields used at least once, with the "me > my @big_array; > #---- finds where items.itemnumber is stored > my ( $itemtagfield, $itemtagsubfield) = &GetMarcFromKohaField("items.itemnumber", $frameworkcode); >-my ($branchtagfield, $branchtagsubfield) = &GetMarcFromKohaField("items.homebranch", $frameworkcode); > C4::Biblio::EmbedItemsInMarcBiblio($temp, $biblionumber); > my @fields = $temp->fields(); > >-- >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 15239
:
45104
| 73488