From 2c90bb9f1e8c66b4ae2ba1d1963066d133170b87 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Tue, 10 Sep 2024 10:10:45 -0400 Subject: [PATCH] Select custom field for import if it has a "spec" A field with a "spec" is one returned by corehq.apps.case_importer.suggested_fields.get_suggested_case_fields(). Before 2772741c236d50109ba0c06b33d0fcdd142ad31e these fields were selected for import by default. --- .../apps/case_importer/static/case_importer/js/excel_fields.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/corehq/apps/case_importer/static/case_importer/js/excel_fields.js b/corehq/apps/case_importer/static/case_importer/js/excel_fields.js index 395ee3dfb6f6..dd821f3206a6 100644 --- a/corehq/apps/case_importer/static/case_importer/js/excel_fields.js +++ b/corehq/apps/case_importer/static/case_importer/js/excel_fields.js @@ -79,8 +79,7 @@ hqDefine('case_importer/js/excel_fields', [ row.isCustom(false); row.selectedCaseField(field); } else { - var spec = _(caseFieldSpecs).findWhere({field}); - row.isCustom(_.isEmpty(spec) && !systemFields.contains(field)); + row.isCustom(!systemFields.contains(field)); row.selectedCaseField(null); } };