[Koha-bugs] [Bug 12859] Patron import tool doesn't import extened attributes values any longer

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Sep 9 10:47:00 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12859

--- Comment #5 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
(In reply to Petter Goksøyr Åsen from comment #2)

> I'm happy to sign off, only I couldn't get it to work to specify
> default value for extended attribute. How is the syntax for that?
> Same as in the CSV?

Not the same syntax; for patron_attributes column in csv file, it may be
something like that (double/triple quotes)

   """DPCODE:PK-B"",""KNTPAP:BPK"",""KNTPAP:BWM"",""SHOW_BCODE:1"""

but when specified as default value it needs to be in the different format
(single quotes around each one of the atrributes, or no quotes at all):

   "DPCODE:PK-B","KNTPAP:BPK","KNTPAP:BWM","SHOW_BCODE:1"

It works (at least for me) when the default values are given in such format.
But I only tested some trivial cases ("Ignore this one, keep the existing one":
checked, "Replace all patron attributes": checked, no matchpoints defined for
extended atrributes).

Another possible reason for the attributes not being added to the database is
mentioned in comment #0 (Ad.1): in such a case, there would be also some errors
in the logfile:

import_borrowers.pl: Database returned the following error: Cannot add or
update a child row: a foreign key constraint fails
(`koha`.`borrower_attributes`, CONSTRAINT `borrower_attributes_ibfk_2` FOREIGN
KEY (`code`) REFERENCES `borrower_attribute_types` (`code`) ON DELETE CASCADE
ON UPDATE CASCADE) at /home/koha/devkohaclone/C4/Members/Attributes.pm line 232

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list