Bug 7054 - NORMARC: Fix default for 000 position 17
authorMagnus Enger <magnus@enger.priv.no>
Mon, 15 Apr 2013 17:02:46 +0000 (19:02 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Wed, 1 May 2013 11:47:52 +0000 (07:47 -0400)
Someone at the library education in Oslo told me that it would be
better to have the default for 000/17 set to 1, instead of 2 as it
is today.

To reproduce:
- Run through the Web-installer in Norwegian and choose NORMARC as
  the MARC dialect
- Go to Home > Cataloging > Add MARC record and start to add a new
  record
- Click in the 000 field and it should be filled with:
  "     nam a22     2  4500"
- Reload the page, then open the value builder for 000 and click on OK
- 000 should get filled with the same string as above

To test:
- Apply the patch and repeat the steps from above. The default value
  for 000 should now be:
  "     nam a22     1  4500"

(Don't be confused by the 1s and the 2s. A value of 1 in position 17
means "level 2", and a value of 2 means "level 1" - that is how it
is defined in the "standard":
1 = Nivå 2, iflg. Katalogiseringsregler
2 = Nivå 1, iflg. Katalogiseringsregler)

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Small changes. Didn't test in a NORMARC installaton, but
trusting Magnus with this and seeing no reason why it
shouldn't work.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
cataloguing/value_builder/normarc_leader.pl

index fd29d60..260d346 100755 (executable)
@@ -45,7 +45,7 @@ my $res="
 
 function Focus$function_name(subfield_managed) {
     if(!document.getElementById(\"$field_number\").value){
-        document.getElementById(\"$field_number\").value = '     nam a22     2  4500';
+        document.getElementById(\"$field_number\").value = '     nam a22     1  4500';
     }
     return 1;
 }
@@ -81,7 +81,7 @@ my ($template, $loggedinuser, $cookie)
                             flagsrequired => {editcatalogue => 1},
                             debug => 1,
                             });
-       $result = "     nam a22     2  4500" unless $result;
+       $result = "     nam a22     1  4500" unless $result;
        my $f5 = substr($result,5,1);
        my $f6 = substr($result,6,1);
        my $f7 = substr($result,7,1);