diff --git a/CHANGELOG b/CHANGELOG
index 0ae5369d7961c71e4694e928d48cf25f2429fde2..6d2bb604255f5a2a3367ccd7bc7ee4ee08051875 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -26,7 +26,10 @@ smasch (1.1.0~alpha.0-1) unstable; urgency=low
     multiple days (#430, #429)
   * bug fix: Search form should always redirect to web.views.kit_requests
     (#433)
-  * bug fix: printing mail template failed for general appointments (#435).
+  * bug fix: printing mail template failed for general appointments (#435)
+  * bug fix: import of csv with subjects did not work with custom fields for
+    subjects that existed in db (#415)
+
 
  -- Piotr Gawron <piotr.gawron@uni.lu>  Thu, 25 Feb 2021 17:00:00 +0200
 
diff --git a/smash/web/importer/importer.py b/smash/web/importer/importer.py
index 0d7f66ea8c83f8290def8f6afceb2e63fd8fd344..9818085cfec23523d3c27eccc455dff33d7fe1ee 100644
--- a/smash/web/importer/importer.py
+++ b/smash/web/importer/importer.py
@@ -66,7 +66,7 @@ class Importer(EtlCommon):
                     new_value = self.get_new_value(old_value, getattr(study_subject, field.name))
                     self.create_provenance_and_change_data(db_study_subject, field.name, new_value, StudySubject)
             db_study_subject.save()
-
+            study_subject= db_study_subject
             self.merged_count += 1
         else:
             if study_subject.type_id is None:
@@ -77,6 +77,7 @@ class Importer(EtlCommon):
             self.create_provenance_for_new_object(Subject, study_subject.subject)
             self.create_provenance_for_new_object(StudySubject, study_subject)
             self.added_count += 1
+
         for custom_field_value in self.reader.get_custom_fields(study_subject):
             study_subject.set_custom_data_value(custom_field_value.study_subject_field, custom_field_value.value)
 
diff --git a/smash/web/tests/importer/test_importer.py b/smash/web/tests/importer/test_importer.py
index b81a3f9f8b48e307c5e57c80b1de5d95ce971f72..47895659bf7d7aef124fd7a296168cb398f47a3b 100644
--- a/smash/web/tests/importer/test_importer.py
+++ b/smash/web/tests/importer/test_importer.py
@@ -5,10 +5,12 @@ import logging
 from django.test import TestCase
 from django.utils import timezone
 
-from web.importer import Importer
-from web.models import Subject, StudySubject, Provenance, SubjectImportData
-from web.tests.functions import create_study_subject, get_test_study, get_control_subject_type
+from web.importer import Importer, CsvSubjectImportReader
+from web.models import Subject, StudySubject, Provenance, SubjectImportData, EtlColumnMapping
+from web.tests.functions import create_study_subject, get_test_study, get_control_subject_type, get_resource_path
 from .mock_reader import MockReader
+from ...models.constants import CUSTOM_FIELD_TYPE_TEXT
+from ...models.custom_data import CustomStudySubjectField
 
 logger = logging.getLogger(__name__)
 
@@ -110,3 +112,34 @@ class TestImporter(TestCase):
         self.assertEqual(existing_study_subject.subject.last_name, subject.last_name)
         self.assertEqual(existing_study_subject.subject.date_born.strftime("%Y-%m-%d"),
                          subject.date_born.strftime("%Y-%m-%d"))
+
+    def test_load_with_merge_custom_field(self):
+        study_subject = create_study_subject(nd_number='Cov-000001')
+        study_subject.screening_number = study_subject.nd_number
+        study_subject.save()
+
+        self.test_load_custom_field()
+
+    def test_load_custom_field(self):
+        field = CustomStudySubjectField.objects.create(study=get_test_study(), name='my custom field',
+                                                       type=CUSTOM_FIELD_TYPE_TEXT)
+
+        subject_import_data = SubjectImportData.objects.create(study=get_test_study(), date_format="%d-%m-%Y")
+        EtlColumnMapping.objects.create(etl_data=subject_import_data,
+                                        column_name="screening_number",
+                                        csv_column_name="participant_id",
+                                        table_name=StudySubject._meta.db_table)
+        EtlColumnMapping.objects.create(etl_data=subject_import_data,
+                                        column_name="nd_number",
+                                        csv_column_name="participant_id",
+                                        table_name=StudySubject._meta.db_table)
+
+        subject_import_data.filename = get_resource_path('import_custom_field.csv')
+        reader = CsvSubjectImportReader(subject_import_data)
+
+        importer = Importer(reader=reader)
+        importer.execute()
+
+        self.assertEqual(3, StudySubject.objects.count())
+        study_subject = StudySubject.objects.filter(nd_number='Cov-000001').first()
+        self.assertEqual("Bla", study_subject.get_custom_data_value(field).value)