diff --git a/models_and_helper_scripts/sample-management-datamodel.yml b/models_and_helper_scripts/sample-management-datamodel.yml index 8067eacd15690a47649976c9dbcba2ed3cf58157..d769e01f37ac19f48614cb2d72caa2d01bc7c40d 100644 --- a/models_and_helper_scripts/sample-management-datamodel.yml +++ b/models_and_helper_scripts/sample-management-datamodel.yml @@ -97,10 +97,6 @@ Sample: datatype: TEXT Notes: datatype: TEXT - Time sampled start: - datatype: DATETIME - Time sampled stop: - datatype: DATETIME AphiaID: description: An ID for this taxon that allows to uniquely identify it on http://www.marinespecies.org. datatype: INTEGER @@ -171,11 +167,11 @@ Event: obligatory_properties: Gear: recommended_properties: - Time start: + start_date: description: The date and time the event started. datatype: DATETIME suggested_properties: - Time stop: + end_date: description: The date and time the event ended. datatype: DATETIME diff --git a/sample-management-custom/caosdb-server/scripting/bin/crawl_sample_data_async.py b/sample-management-custom/caosdb-server/scripting/bin/crawl_sample_data_async.py index 1e17a3340673e91dd3fc72e959a9b68b541fbc34..7d99c3a234ba4b4b805138485b18b589a7014f15 100755 --- a/sample-management-custom/caosdb-server/scripting/bin/crawl_sample_data_async.py +++ b/sample-management-custom/caosdb-server/scripting/bin/crawl_sample_data_async.py @@ -557,15 +557,9 @@ def update_sample_records(data, htmluserlog_public): .add_parent(name="Sphere") for el in row["Sphere"]]) - if "Date collected start" in row and return_value_if_not_none(row["Date collected start"]) is not None: - sample = _update_property(entity=sample, property_id=event_property_id, property_name='SourceEvent', value=get_event( - row, get_gear(row))) if "PDFReport" in data.columns: sample = _update_property( entity=sample, property_id=pdfreport_property_id, property_name="PDFReport", value=row["PDFReport"]) - if "Date sampled start" in data.columns: - sample = _append_times_to_entity(ent=sample, data=row, propname_prefix="Time sampled", - colname_time_prefix="Time sampled", colname_date_prefix="Date sampled") # Add additional properties for property_name in additional_property_ids.keys(): diff --git a/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/default_constants.yml b/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/default_constants.yml index 687b32c6884d1cdf3a881a839e9aaaf26a1e70aa..de676e01d4d4b47f6689e7d18d2a4fe5b07b7913 100644 --- a/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/default_constants.yml +++ b/sample-management-custom/caosdb-server/scripting/bin/sample_helpers/default_constants.yml @@ -58,6 +58,8 @@ entity_names: responsible_rt: Responsible first_name_prop: first_name last_name_prop: last_name + start_date_prop: start_date + end_date_prop: end_date error_prefix: "Something went wrong:" error_suffix: "Please contact your administrator(s)."