-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for [issue](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007XIPZMSA5) related to your recent PR ([3702](#3702)). **Error Message:** `AttributeError: is_person_type` **Issue Reason:** During load, the tasks expects the column `is+person_type` to be present in the record type table `rt_mapping_table`. This column is present for sql files which do extract after the new release of CumulusCI (v3.84.0) but will not be present for existing sql files. **Fix:** Previously the `outerjoins_to_add` function of the `AddRecordTypesToQuery` class checks if the combination of `is_person_type` and `developer_name` is unique. Now, if the `rt_mapping_table` does not have the `is_person_type` table, the task ignores the condition to check for record types based on `is_person_type` and only checks for `developer_name` (as it was previous to this PR [3702](#3702)) --------- Co-authored-by: Jaipal Reddy Kasturi <[email protected]>
- Loading branch information
1 parent
cbb223e
commit 6d87bbb
Showing
6 changed files
with
70 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
cumulusci/tasks/bulkdata/tests/recordtypes_with_ispersontype.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
BEGIN TRANSACTION; | ||
CREATE TABLE "Account_rt_mapping" ( | ||
record_type_id VARCHAR(18) NOT NULL, | ||
developer_name VARCHAR(255), | ||
is_person_type BOOLEAN, | ||
PRIMARY KEY (record_type_id) | ||
); | ||
INSERT INTO "Account_rt_mapping" VALUES('012P0000000bCMdIAM','Organization',0); | ||
INSERT INTO "Account_rt_mapping" VALUES('012P0000000bCQqIAM','Subsidiary',0); | ||
CREATE TABLE accounts ( | ||
sf_id VARCHAR(255) NOT NULL, | ||
"Name" VARCHAR(255), | ||
"Description" VARCHAR(255), | ||
"Street" VARCHAR(255), | ||
"City" VARCHAR(255), | ||
"State" VARCHAR(255), | ||
"PostalCode" VARCHAR(255), | ||
"Country" VARCHAR(255), | ||
"Phone" VARCHAR(255), | ||
"Fax" VARCHAR(255), | ||
"Website" VARCHAR(255), | ||
"NumberOfEmployees" VARCHAR(255), | ||
"AccountNumber" VARCHAR(255), | ||
"Site" VARCHAR(255), | ||
"Type" VARCHAR(255), | ||
"RecordTypeId" VARCHAR(255), | ||
parent_id VARCHAR(255), | ||
PRIMARY KEY (sf_id) | ||
); | ||
INSERT INTO "accounts" VALUES('001P000001ZgnJYIAZ','','This is the parent account.','111 Main St.','Nowhereton','NE','11111','USA','5055551212','5055551213','www.acme.com','100','1','Local','Prospect','012P0000000bCMdIAM',''); | ||
INSERT INTO "accounts" VALUES('001P000001ZgnJZIAZ','','','','','','','','','','','','','','','012P0000000bCQqIAM','001P000001ZgnJYIAZ'); | ||
INSERT INTO "accounts" VALUES('001P000001ZgnJaIAJ','','','','','','','','','','','','','','','',''); | ||
INSERT INTO "accounts" VALUES('001P000001ZgnTHIAZ','','','','','','','','','','','','','','','012P0000000bCQqIAM','001P000001ZgnJZIAZ'); |
8 changes: 8 additions & 0 deletions
8
cumulusci/tasks/bulkdata/tests/recordtypes_with_ispersontype.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Insert Accounts: | ||
api: bulk | ||
sf_object: Account | ||
table: accounts | ||
fields: | ||
Id: sf_id | ||
Name: Name | ||
RecordTypeId: RecordTypeId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters