KingdomFirst / Bulldozer

A multi-component Windows app to convert data into Rock RMS from other church management systems.
https://www.rockrms.com/
Apache License 2.0
8 stars 9 forks source link

B: Cannot import person attribute value from CSV #92

Open lauweijie opened 10 months ago

lauweijie commented 10 months ago

Prerequisites

We will take your suggestion into consideration, however, if you would like to sponsor this change, please email sales@kingdomfirstsolutions.com and we will process an estimate for you.

Otherwise, bugs will be addressed in the order of criticality, and enhancements will be addressed as sponsored, or as we have the available bandwidth. Note: Our code may not be vetted for, and may not support early release Rock versions only general release Rock versions.

Please answer the following questions for yourself before submitting an issue.

Bug Classifications:

Enhancement: A desired change to the code that enhances functionality verses fixing an issue.

Bug: Updating code to work as originally designed.

Expected Behavior

Successfully import person attribute values from CSV

Current Behavior

Failed to import person attribute values from CSV even though person ID matches existing record

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Prepare person-attributevalue.csv
  2. Follow the steps to import

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

10:59:55 PM  Staging csv data...
10:59:55 PM  PersonAttributeValue records: 1
10:59:55 PM  Starting health checks...
11:00:18 PM  Loading relavent existing data dictionaries.
11:00:23 PM  Checking for new GroupTypes
11:00:23 PM  Checking for new DefinedTypes in Attributes
11:00:23 PM  Checking for new Attribute Categories
11:00:23 PM  Checking for new Person, Business, Family, or Group Attributes
11:00:23 PM  Checking for new DefinedValues used in csv data.
11:00:24 PM  Preparing Person Attribute Value data for import...
11:00:24 PM  Begin processing 0 Person Attribute Value Records...
11:00:24 PM  Completed import: 0 rows processed.
11/11/2023 11:00:24 PM, PersonAttributeValue, PersonId 1 not found. AttributeValue for ExampleAttribute attribute was skipped.
guymaness2 commented 9 months ago

@lauweijie Bulldozer is designed with the understanding that it could be used in an environment with previously existing data. Much of the data import logic is tightly wrapped around the concept of targeting data related to the Bulldozer instance. You can see a brief explanation of this ideology in our wiki. For example, all data that is person focused will only target people who have been previously imported using the same ForeignKey Prefix set while imported (see screenshot below). In your case, that error is telling you that PersonId = 1 referenced in your person-attributevalue.csv did not match any previously imported people imported with the same ForeignKey Prefix and an Id of 1.

image

If you still feel like this doesn't answer your problem, please provide a sample copy (sanitized of personal info) of your person.csv file and person-attributevalue.csv file that are not working for us to analyze.