Skip to content
Snippets Groups Projects
Commit aafe0d51 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Bugfix: Auto-setting isQuantified based on observationData contents

parent dae3f676
Branches
No related tags found
No related merge requests found
...@@ -588,7 +588,7 @@ ...@@ -588,7 +588,7 @@
else { else {
this.observationForStore.statusTypeId = CommonUtil.CONST_STATUS_PENDING; this.observationForStore.statusTypeId = CommonUtil.CONST_STATUS_PENDING;
} }
this.observationForStore.isQuantified = this.observation.isQuantified;
this.observationForStore.userId = this.observation.userId; this.observationForStore.userId = this.observation.userId;
this.observationForStore.geoinfo = JSON.stringify(this.mapGeoinfo); //this.observation.geoinfo; this.observationForStore.geoinfo = JSON.stringify(this.mapGeoinfo); //this.observation.geoinfo;
//CommonUtil.logInfo("this.mapGeoinfo=" + this.mapGeoinfo + ". this.observationForStore.geoinfo=" + this.observationForStore.geoinfo); //CommonUtil.logInfo("this.mapGeoinfo=" + this.mapGeoinfo + ". this.observationForStore.geoinfo=" + this.observationForStore.geoinfo);
...@@ -598,6 +598,7 @@ ...@@ -598,6 +598,7 @@
this.observationForStore.observationHeading = this.observation.observationHeading; this.observationForStore.observationHeading = this.observation.observationHeading;
this.observationForStore.observationText = this.observation.observationText; this.observationForStore.observationText = this.observation.observationText;
this.observationForStore.observationData = JSON.stringify(this.observation.observationData)//'{"number":0,"unit":"Number"}'; //"{\"number\":0,\"unit\":\"Number\"}"; 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; this.observationForStore.observationIllustrationSet = this.observation.observationIllustrationSet;
// Update the record inside the list of observations // Update the record inside the list of observations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment