Bug 4839 - Adjust default values for MARC21 authority Fixed-Length Data Elements
Summary: Adjust default values for MARC21 authority Fixed-Length Data Elements
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) enhancement (vote)
Assignee: Marcel de Rooy
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-31 09:27 UTC by Marcel de Rooy
Modified: 2012-10-25 23:10 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Patch (76 bytes, text/plain)
2010-11-04 10:54 UTC, Marcel de Rooy
Details
Patch (5.60 KB, patch)
2010-12-20 12:30 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Patch for functionality (5.72 KB, patch)
2011-03-17 11:56 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Follow-up patch for installation pref (9.85 KB, patch)
2011-03-17 12:28 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 4839: Adjust default values for MARC21 authority Fixed-Length Data Elements (5.72 KB, patch)
2011-05-30 08:05 UTC, Chris Cormack
Details | Diff | Splinter Review
Follow-up patch for install (13.46 KB, patch)
2011-06-01 12:12 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2010-05-31 09:27:21 UTC
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.
Comment 1 Marcel de Rooy 2010-06-10 11:05:02 UTC
I submitted a separate patch for 3.0.x and master today.
Comment 2 Marcel de Rooy 2010-11-04 10:54:45 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2010-11-04 10:56:11 UTC
See patch. Is still valid for master.
Comment 4 Marcel de Rooy 2010-11-29 14:35:02 UTC
Patch updated and revised.
See http://lists.koha-community.org/pipermail/koha-patches/2010-November/013119.html
Comment 5 Marcel de Rooy 2010-12-20 12:30:52 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2011-03-17 11:56:55 UTC Comment hidden (obsolete)
Comment 7 Marcel de Rooy 2011-03-17 12:28:07 UTC Comment hidden (obsolete)
Comment 8 MJ Ray (software.coop) 2011-04-01 09:42:45 UTC
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
Comment 9 Marcel de Rooy 2011-04-07 10:28:13 UTC
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
Comment 10 Marcel de Rooy 2011-04-27 10:04:29 UTC
Patch for functionality still applies to 3.05.00.001.
I will rebase the second install patch if the first patch gets a signoff.
Comment 11 Chris Cormack 2011-05-30 08:05:39 UTC
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>
Comment 12 Chris Cormack 2011-05-30 08:06:32 UTC
Signed off on the functionality part, follow up patch needs a rebase.
Comment 13 Marcel de Rooy 2011-06-01 12:11:06 UTC
(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.
Comment 14 Marcel de Rooy 2011-06-01 12:12:03 UTC
Created attachment 4328 [details] [review]
Follow-up patch for install
Comment 15 Paul Poulain 2011-08-03 10:35:17 UTC
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
Comment 16 Ian Walls 2011-08-03 20:42:47 UTC
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.
Comment 17 Chris Cormack 2011-08-03 22:20:48 UTC
Pushed, please test
Comment 18 Marcel de Rooy 2011-10-03 07:24:25 UTC
Closing it myself now; runs in production with us for months.