Currently, the default for this marc field is hardcoded in the plugin code of marc21_field_008_authorities.pl (two occurrences). I suggest to move this value to a new system preference. If this pref should not exist, the old hardcoded value could still be used. Furthermore, the default for position 14 (heading use: main or added entry) should be dependent on the authority type. For CHRON_TERM, GENRE/FORM and TOPIC_TERM, it should be b (not appropriate) instead of a (appropriate). Finally, a small bug should be resolved on the line: my $f32 = substr($result,32,2); this field is only one character, so should be: my $f32 = substr($result,32,1); I will send a preview of a patch to the developer list.
I submitted a separate patch for 3.0.x and master today.
Created attachment 2729 [details] Patch
See patch. Is still valid for master.
Patch updated and revised. See http://lists.koha-community.org/pipermail/koha-patches/2010-November/013119.html
Created attachment 2889 [details] [review] Patch Still valid for 3c19f22f8625105715f9ba5f4fca2b0502bcd9cc. (master Dec 20, 2010)
Created attachment 3337 [details] [review] Patch for functionality Rebased.
Created attachment 3338 [details] [review] Follow-up patch for installation pref
This bug is mentioned in: Bug 4839: Adjust default values for MARC21 authority Fixed-Length Data Elements http://lists.koha-community.org/pipermail/koha-patches/2011-March/014107.html Bug 4839: Follow-up patch for installing pref http://lists.koha-community.org/pipermail/koha-patches/2011-March/014108.html
Test this patch with: Goto Authorities in staff make new auth record default, check 008: 110407|| aca||aabn | a|a d make new auth record topic term, check 008 incl pos 14- Heading use--main or added entry: should be b 110407|| aca||babn | a|a d Now change MARCAuthorityControlField008 to || az|||aabn || a|| |d if you copy and paste this example value, start with the first |-char make new auth record default, check 008: SHOULD BE DIFFERENT NOW 110407|| az|||aabn || a|| |d make new auth record topic term, check 008 incl pos 14- Heading use--main or added entry: should be b 110407|| az|||babn || a|| |d
Patch for functionality still applies to 3.05.00.001. I will rebase the second install patch if the first patch gets a signoff.
Created attachment 4298 [details] [review] Bug 4839: Adjust default values for MARC21 authority Fixed-Length Data Elements Currently, the default for this MARC control field is hardcoded in the plugin code of marc21_field_008_authorities.pl (two occurrences). This patch moves it into a new syspref. If this pref should not exist, the old hardcoded value is used. Authorities preference file is updated too. A warning is generated if the length of the field is not correct. Furthermore, the default for position 14 (heading use: main or added entry) should be dependent on the authority type. For CHRON_TERM, GENRE/FORM and TOPIC_TERM, it should be b (not appropriate) instead of a (appropriate). Rebased on March 17. Follow-up patch added for installation pref. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed off on the functionality part, follow up patch needs a rebase.
(In reply to comment #12) > Signed off on the functionality part, follow up patch needs a rebase. Thanks for signing off. Rebased the install patch. Setting status to Signed off.
Created attachment 4328 [details] [review] Follow-up patch for install
QA comments * I don't like when we add sysprefs, but I have no counter-proposition, so OK for this one (the "default value" you can set for biblios don't exist for authorities. Otherwise, that would have made the job isn't it ? ) * I don't know marc21 well enough to confirm the behaviour is correct, so I don't mark it as passed QA. Chris signed-off, I see nothing strange in the code, so Ian, I think you can validate, but I let you do
Clear test plan provided, patch works according to plan. Database update followup patch includes all languages, and properly differs version setting to RM. Marking as Passed QA. Small followup suggestion (this is very minor): changing the systempreference entry "type" to "free" instead of "textarea"... I don't think that we need that much space to fill in this field, or to hide it behind and "edit this" link. Again, minor.
Pushed, please test
Closing it myself now; runs in production with us for months.