We're updating the issue view to help you get more done. 

Successive caUtils import-data creates duplicate locale nonpreferred_labels

Description

First import (merge on idno with update) creates the object record. Second run duplicates the nonpreferred_label. Third run creates a third nonpreferred_label. Ans so on.

Each label is assigned to the same locale. The "update" directive is ignored. caUtils adds a new label each time.

Suggested workaround : To give the possibility to force the locale with an option for the 'localisable' fields in the import mapping.
Same as the option in export mapping :
locale : Locale code to use to get the field values from the database. If not set, the system/user default is used. Valid locale code : de_DE

Environment

Debian 8

Activity

Show:
Calc
December 15, 2015, 5:26 AM

Edit !

Colateral problem : this issue is really blocking.

After two successive imports in order to update some fields in the database, 'nonpreferred_label' is duplicated. (up to 10 times in my situation after 10 runs).

By doing a modification then In Firefox, the saving of the modified object warns and fails :

There are errors preventing information in specific fields from being saved as noted below.
•Duplicate entry '5-ALTERNATIVE OBJECT TITLE-69-1' for key 'u_all'

The only one possibility to save modification at this time is to remove all duplicated Alternative Title.

User known
December 15, 2015, 6:54 AM

Can you send me your profile as well?

Calc
December 15, 2015, 7:02 AM

No need : those tests are with default.xml profile.

User known
December 15, 2015, 7:14 AM

Hi,

Drop the attached ca_data_importers.php file into the app/models directory in your installation and try the import again please? If it resolves the issue I'll commit it and role another minor release.

seth

Calc
December 15, 2015, 8:01 AM

Thank you for your reactivity !

This works, no more duplicates for this nonpreferred_labels field. Tested on my own XML profile.

Solved
Thanks again.

Fixed

Assignee

User known

Reporter

Calc

Labels

Components

Affects versions

Priority

Major
Configure