Bugzilla – Attachment 36051 Details for
Bug 10773
Add item-level descriptions for Label Printing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 10773 - Add item-level descriptions for Label Printing
SIGNED-OFF-Bug-10773---Add-item-level-descriptions.patch (text/plain), 2.15 KB, created by
Nick Clemens (kidclamp)
on 2015-02-19 20:08:56 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 10773 - Add item-level descriptions for Label Printing
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2015-02-19 20:08:56 UTC
Size:
2.15 KB
patch
obsolete
>From 40448aa3a3dddae9eca9e4af53a0e92b855f6e86 Mon Sep 17 00:00:00 2001 >From: Dobrica Pavlinusic <dpavlin@rot13.org> >Date: Wed, 21 Aug 2013 15:18:31 +1000 >Subject: [PATCH] [SIGNED OFF] Bug 10773 - Add item-level descriptions for > Label Printing > >This patch adds new fields ccode_description, homebranch_description, >holdingbranch_description, location_description and >permanent_location_description which can be used in the Label Creator >to display names/descriptions instead of codes > >Test Plan: > >1) Edit a layout in the Label Creator so that it includes any of these >fields. I suggest including "homebranch_description" and perhaps >"ccode_description" if you have them in your item data. >2) Add items to a batch in the Label Creator. >3) Export the batch using the layout, and view as PDF >4) Verify that you see descriptions for fields which you added > >Signed-off-by: Nick <Nick@quechelibrary.org> >--- > C4/Labels/Label.pm | 10 ++++++++++ > 1 file changed, 10 insertions(+) > >diff --git a/C4/Labels/Label.pm b/C4/Labels/Label.pm >index bd3ee4f..83093a4 100644 >--- a/C4/Labels/Label.pm >+++ b/C4/Labels/Label.pm >@@ -97,6 +97,16 @@ sub _get_label_item { > my $data1 = $sth1->fetchrow_hashref; > $data->{'itemtype'} = $data1->{'description'}; > $data->{'itype'} = $data1->{'description'}; >+ # add *_description fields >+ if ($data->{'homebranch'} || $data->{'holdingbranch'}){ >+ require C4::Branch; >+ $data->{'homebranch_description'} = C4::Branch::GetBranchName($data->{'homebranch'}) if $data->{'homebranch'}; >+ $data->{'holdingbranch_description'} = C4::Branch::GetBranchName($data->{'holdingbranch'}) if $data->{'holdingbranch'}; >+ } >+ $data->{'ccode_description'} = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'ccode'} ,'','','CCODE', 1) if $data->{'ccode'}; >+ $data->{'location_description'} = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'location'} ,'','','LOC', 1) if $data->{'location'}; >+ $data->{'permanent_location_description'} = C4::Biblio::GetAuthorisedValueDesc('','', $data->{'permanent_location'} ,'','','LOC', 1) if $data->{'permanent_location'}; >+ > $barcode_only ? return $data->{'barcode'} : return $data; > } > >-- >1.7.10.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 10773
:
20520
|
20541
|
21285
|
34539
|
34634
|
35031
|
36051
|
36052
|
36085
|
36086