From aafe0d510d258b4b5ec361bdd5a1943e7878a2ef Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Fri, 10 Jun 2022 11:16:24 +0200 Subject: [PATCH] Bugfix: Auto-setting isQuantified based on observationData contents --- src/components/Observation.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Observation.vue b/src/components/Observation.vue index b2799e7..fe4a898 100644 --- a/src/components/Observation.vue +++ b/src/components/Observation.vue @@ -588,7 +588,7 @@ else { this.observationForStore.statusTypeId = CommonUtil.CONST_STATUS_PENDING; } - this.observationForStore.isQuantified = this.observation.isQuantified; + this.observationForStore.userId = this.observation.userId; this.observationForStore.geoinfo = JSON.stringify(this.mapGeoinfo); //this.observation.geoinfo; //CommonUtil.logInfo("this.mapGeoinfo=" + this.mapGeoinfo + ". this.observationForStore.geoinfo=" + this.observationForStore.geoinfo); @@ -598,6 +598,7 @@ this.observationForStore.observationHeading = this.observation.observationHeading; this.observationForStore.observationText = this.observation.observationText; this.observationForStore.observationData = JSON.stringify(this.observation.observationData)//'{"number":0,"unit":"Number"}'; //"{\"number\":0,\"unit\":\"Number\"}"; + this.observationForStore.isQuantified = this.observationForStore.observationData.trim().length > 4; // 4 is accounting for quotation marks this.observationForStore.observationIllustrationSet = this.observation.observationIllustrationSet; // Update the record inside the list of observations -- GitLab