|
|
|
@ -285,7 +285,7 @@ class BulkUpload::Sales::Year2022::RowParser |
|
|
|
validate :validate_created_by_related, on: :after_log |
|
|
|
validate :validate_created_by_related, on: :after_log |
|
|
|
validate :validate_relevant_collection_window, on: :after_log |
|
|
|
validate :validate_relevant_collection_window, on: :after_log |
|
|
|
validate :validate_incomplete_soft_validations, on: :after_log |
|
|
|
validate :validate_incomplete_soft_validations, on: :after_log |
|
|
|
validate :validate_if_log_already_exists, on: :after_log |
|
|
|
validate :validate_if_log_already_exists, on: :after_log, if: -> { FeatureToggle.bulk_upload_duplicate_log_check_enabled? } |
|
|
|
|
|
|
|
|
|
|
|
def self.question_for_field(field) |
|
|
|
def self.question_for_field(field) |
|
|
|
QUESTIONS[field] |
|
|
|
QUESTIONS[field] |
|
|
|
@ -592,7 +592,7 @@ private |
|
|
|
|
|
|
|
|
|
|
|
attributes["othtype"] = field_85 |
|
|
|
attributes["othtype"] = field_85 |
|
|
|
|
|
|
|
|
|
|
|
attributes["owning_organisation_id"] = owning_organisation_id |
|
|
|
attributes["owning_organisation"] = owning_organisation |
|
|
|
attributes["created_by"] = created_by || bulk_upload.user |
|
|
|
attributes["created_by"] = created_by || bulk_upload.user |
|
|
|
attributes["hhregres"] = hhregres |
|
|
|
attributes["hhregres"] = hhregres |
|
|
|
attributes["hhregresstill"] = hhregresstill |
|
|
|
attributes["hhregresstill"] = hhregresstill |
|
|
|
@ -804,10 +804,6 @@ private |
|
|
|
Organisation.find_by_id_on_multiple_fields(field_92) |
|
|
|
Organisation.find_by_id_on_multiple_fields(field_92) |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def owning_organisation_id |
|
|
|
|
|
|
|
owning_organisation&.id |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def created_by |
|
|
|
def created_by |
|
|
|
@created_by ||= User.find_by(email: field_93) |
|
|
|
@created_by ||= User.find_by(email: field_93) |
|
|
|
end |
|
|
|
end |
|
|
|
|