https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19693 Bug ID: 19693 Summary: authtypefrom incorrectly set when updating auth recs from file Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: MARC Authority data support Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org In those cases when authorities are updated by an external agency (or even internally, by reviewing and correcting an exported authority file) when the heading tag will be changed (seems odd but happens: 111 Congress ==> 110 Corporate body.Congress ; 100 Person ==> 110 Corporate body (a company named with person's name ; 151 City--object ==> 150 Object (city) etc.) and then the authority record in Koha database will be updated with bulkmarcimport or by calling directly ModAuthority from a custom script, the merge function "doesn't know" that the change to the authority type has been made and, consequently, doesn't adequately change the tag in related fields in biblio records (as it would if two different records with different authtypecode were merged with Koha interface). This is because at the moment when merge function is being called by ModAuthority Koha::Authority::Types->find($autfrom->authtypecode) Koha::Authority::Types->find($authto->authtypecode) both have the same value (because $autfrom == $autfrom). Therefore the authtype guessed from the old version of the record should be considered. To test: 1) have an authority record used in biblio; export it to file; change 1XX heading tag to different (but reasonable) value and possibly change also the content of the heading (one can delete also 942 but it doesn't matter); make bulkmarcimport.pl -a -update -file <modified_auth_file> and see that the tag in biblio record has not been changed (whereas the type of authority record did change); 2) make orders in database (so that the authority type and the tag of the field in biblio record correspond); apply the patch; 3) repeat the test from 1). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.