Uploaded image for project: 'Providence'
  1. PROV-547

Data Importer: entitySplitter refinery returning the wrong entities

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 1.4
    • Fix versions: None
    • Components: Administrative tools
    • Labels:
    • Environment:
      Ubuntu 12.04 PHP 5.4

      Description

      Hi All,
      I have an import mapping for occurrences that relate to entities and the recent change to support mappings using ca_tablename.idno (382b3905633d4beb3a05ef6ac78c9ce5844868f4) seems to have broken the relationship mappings using the entitySplitter refinery.

      What seems to be happenning is that DataMigrationUtils::getEntityID() is finding the correct entity but it is then returning the ID of the entity label rather than the id of the entity. I thought I was going nuts until I did a query on the ca_entity_labels table limiting to the relevant entity names.


      The debug log gave me:

      2013-08-22 13:23:05 - DEBUG --> Found existing entity J.L./Barnard in DataMigrationUtils::getEntityID(); total of 1 entities were found

      But then viewing the record the related entity is listed as "Jones, I.P."



      select label_id, entity_id, forename, surname, displayname, locale_id from ca_entity_labels where surname like '%barnard%' or surname like '%jones%';

      +----------+-----------+----------+---------+---------------+-----------+
      | label_id | entity_id | forename | surname | displayname | locale_id |
      +----------+-----------+----------+---------+---------------+-----------+
      | 8 | 9 | | Barnard | Barnard | 2 |
      | 17 | 18 | | Jones | Jones | 2 |
      | 310 | 311 | I.P. | Jones | Jones, I.P. | 2 |
      | 311 | 312 | J.L. | Barnard | Barnard, J.L. | 2 |
      +----------+-----------+----------+---------+---------------+-----------+



      My mapping looks like this

      Rule type Source CA table.element Group Options Refinery Refinery parameters Original values Replacement values Source description Notes
      Mapping 20 ca_entities entitySplitter {"delimiter":"&", "entityType" : "ind","relationshipType":"identifiedBy"} Verbatim

        Attachments

          Activity

            People

            • Assignee:
              Former user (Inactive)
              Reporter:
              Kehan Harman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: