Bug 26546

Summary: bulkmarcimport.pl should ignore MarcFieldFor* sysprefs
Product: Koha Reporter: Pablo AB <pablo.bianchi>
Component: Command-line UtilitiesAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: robin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Pablo AB 2020-09-25 21:44:06 UTC
While importing with bulkmarcimport.pl, if some of MarcFieldFor* system preference had been set, those fields/subfields will be created, empty or with a "CLI CLI".

This happens regardless of the framework setup and potentially overwriting data from the imported record.

For e.g., if:

MarcFieldForCreatorId    "$borrowernumber"  901$l
MarcFieldForCreatorName  "$userfirstname $usersurname"  901$m
MarcFieldForModifierId   "$borrowernumber"  901$n
MarcFieldForModifierName "$userfirstname $usersurname"  901$o

INPUT:  901    $a BIBLO $b 00011605 $o GEORGE
OUTPUT: 901    $a BIBLO $b 00011605 $o CLI CLI $l  $m CLI CLI $n

In this case 901$o was overwritten.

The "CLI CLI" comes from the set_userenv call on Script.pm.

This can be seen just googling: "CLI CLI" inurl:"cgi-bin/koha"

Maybe related to Bug 24906.