Bugzilla – Attachment 3298 Details for
Bug 2500
Standing enhancement request for adding/updating call number splitting algorithms in C4/Labels.pm
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Split LCCN on "segmentation" markers: '/'
0001-Bug-2500-Standing-enhancement-request-for-adding-upd.patch (text/plain), 1.58 KB, created by
Chris Nighswonger
on 2011-03-14 21:38:52 UTC
(
hide
)
Description:
Split LCCN on "segmentation" markers: '/'
Filename:
MIME Type:
Creator:
Chris Nighswonger
Created:
2011-03-14 21:38:52 UTC
Size:
1.58 KB
patch
obsolete
>From b1cab59d94670817eb4955ac9ad324f98ed7918d Mon Sep 17 00:00:00 2001 >From: Chris Nighswonger <cnighswonger@foundations.edu> >Date: Mon, 14 Mar 2011 17:30:01 -0400 >Subject: [PATCH] Bug 2500 - Standing enhancement request for adding/updating call number splitting algorithms in C4/Labels.pm >Content-Type: text/plain; charset="utf-8" > >Adding code to support splitting of LCCN numbers with "segmentation" markers like '/' in them. > >Ie. 917.1/0022/2 which is expected to split to 917.1 0022 2 > >This patch also adds a test case based on this example >--- > C4/Labels/Label.pm | 1 + > t/Labels_split_lccn.t | 1 + > 2 files changed, 2 insertions(+), 0 deletions(-) > >diff --git a/C4/Labels/Label.pm b/C4/Labels/Label.pm >index 0ea2de9..25b8c0b 100644 >--- a/C4/Labels/Label.pm >+++ b/C4/Labels/Label.pm >@@ -109,6 +109,7 @@ sub _get_text_fields { > > sub _split_lccn { > my ($lccn) = @_; >+ $lccn =~ s/\// /g; # in theory we should be able to simply remove all segmentation markers and arrive at the correct call number... > $_ = $lccn; > # lccn examples: 'HE8700.7 .P6T44 1983', 'BS2545.E8 H39 1996'; > my (@parts) = m/ >diff --git a/t/Labels_split_lccn.t b/t/Labels_split_lccn.t >index da32317..10919ac 100755 >--- a/t/Labels_split_lccn.t >+++ b/t/Labels_split_lccn.t >@@ -33,6 +33,7 @@ BEGIN { > 'HE8700.7 .P6T44 1983' => [qw(HE 8700.7 .P6 T44 1983)], > 'BS2545.E8 H39 1996' => [qw(BS 2545 .E8 H39 1996)], > 'NX512.S85 A4 2006' => [qw(NX 512 .S85 A4 2006)], >+ '917.1/0022/2' => [qw(917.1 0022 2)], > }; > } > my $test_num = 1; >-- >1.7.0.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 2500
:
684
|
685
|
3298