<commit_before>
Add up to 3 subfields to item call number (was only adding 2)

This is a quick and dirty fix, should implement a proper loop
which handles an arbritary number of subfields.

See Koha bug #9156:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9156

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -148,9 +148,10 @@ sub generate_subfield_form {
             my $CNtag       = substr($pref_itemcallnumber, 0, 3);
             my $CNsubfield  = substr($pref_itemcallnumber, 3, 1);
             my $CNsubfield2 = substr($pref_itemcallnumber, 4, 1);
+            my $CNsubfield3 = substr($pref_itemcallnumber, 5, 1);
             my $temp2 = $temp->field($CNtag);
             if ($temp2) {
-                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2));
+                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2).' '.($temp2->subfield($CNsubfield3));
                 #remove any trailing space incase one subfield is used
                 $value =~ s/^\s+|\s+$//g;
             }
<commit_msg>Fix syntax error in previous commit<commit_after>
Add up to 3 subfields to item call number (was only adding 2)

This is a quick and dirty fix, should implement a proper loop
which handles an arbritary number of subfields.

See Koha bug #9156:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9156

diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl
--- a/cataloguing/additem.pl
+++ b/cataloguing/additem.pl
@@ -148,9 +148,10 @@ sub generate_subfield_form {
             my $CNtag       = substr($pref_itemcallnumber, 0, 3);
             my $CNsubfield  = substr($pref_itemcallnumber, 3, 1);
             my $CNsubfield2 = substr($pref_itemcallnumber, 4, 1);
+            my $CNsubfield3 = substr($pref_itemcallnumber, 5, 1);
             my $temp2 = $temp->field($CNtag);
             if ($temp2) {
-                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2));
+                $value = ($temp2->subfield($CNsubfield)).' '.($temp2->subfield($CNsubfield2)).' '.($temp2->subfield($CNsubfield3));
                 #remove any trailing space incase one subfield is used
                 $value =~ s/^\s+|\s+$//g;
             }

{'fraction_non_alphanumeric': 0.14616373767681098, 'fraction_numerical': 0.03429061294470639, 'mean_word_length': 2.646875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2009053', 'n_tokens_mistral': 806, 'n_tokens_neox': 747, 'n_words': 187}