Bug 3543: split NLM call numbers in label creator
authorJared Camins-Esakov <jcamins@bywatersolutions.com>
Wed, 13 Apr 2011 14:03:03 +0000 (10:03 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 27 Apr 2011 21:04:48 +0000 (09:04 +1200)
Split NLM call numbers using the same rules as those used for Library of
Congress call numbers.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
C4/Labels/Label.pm

index 0ea2de9..0c98d6f 100644 (file)
@@ -408,7 +408,7 @@ sub draw_label_text {
         # Fields which hold call number data  FIXME: ( 060? 090? 092? 099? )
         my @callnumber_list = qw(itemcallnumber 050a 050b 082a 952o 995k);
         if ((grep {$field->{'code'} =~ m/$_/} @callnumber_list) and ($self->{'printing_type'} eq 'BIB') and ($self->{'callnum_split'})) { # If the field contains the call number, we do some sp
-            if ($cn_source eq 'lcc') {
+            if ($cn_source eq 'lcc' || $cn_source eq 'nlm') { # NLM and LCC should be split the same way
                 @label_lines = _split_lccn($field_data);
                 @label_lines = _split_ccn($field_data) if !@label_lines;    # If it was not a true lccn, try it as a custom call number
                 push (@label_lines, $field_data) if !@label_lines;         # If it was not that, send it on unsplit