disarm-dev / douma-app

DiSARM app (2018 and beyond)
MIT License
3 stars 1 forks source link

[ext] Allow NULL value for GPS coordinates for instances where Timeout Error cannot be resolved #459

Closed TNgidi closed 6 years ago

TNgidi commented 6 years ago

@onlyjsmith commented on Thu Jul 19 2018

External feedback source: https://github.com/disarm-platform/user-requests-and-feedback/issues/88 In instances where users are not able to collect GPS points due to hardware issues, they should still be able to submit their form details. These would count in coverage calculations according to their location dropdown selection, but would naturally not appear on the map.

Nicolaidavies commented 6 years ago

We can make GPS coordinates optional.

But it is probably better to only make GPS optional, if we get an error during the collection of the GPS coordinates.

Also, we dont' use GPS coordinates for calculations right now.

TNgidi commented 6 years ago

Sameen might decide to keep the GPS coordinates compulsory, let's what she says next week. @onlyjsmith had said we might be able to configure it so that it is only the NAM instance that can submit a form that does not have GPS coordinates.

onlyjsmith commented 6 years ago

Confirming what @TNgidi mentioned - we might want to use the config to define whether GPS coords are required.

onlyjsmith commented 6 years ago

Just had a look - think there are 3 places we need to look:

  1. src/apps/irs_record_point/pages/record.vue:333 - handling validation in the view
  2. src/lib/models/response/validations/validations.js:19 - handling coords as part of the manual combining of validation 'chunks'
  3. src/lib/models/response/schemas/schema.js:26 - coords as optional?
onlyjsmith commented 6 years ago

Started feature/459-gps-optional branch (with a single sanity-refactor commit)

onlyjsmith commented 6 years ago

Ok - from today's CHAI call: they are removing this as a requirement, but we've agreed to go ahead and implement. This will be very useful if mid-season, any users are having trouble with GPS coords - we can turn-off with a config change, and there won't be a major drop in data quality.

Nicolaidavies commented 6 years ago

The branch uses the property location_coords_optional from instance_config.applets.irs_record_point.

@onlyjsmith any thoughts on naming?

Will need to update config-validation and config-editor when we decide on name.

onlyjsmith commented 6 years ago

gps_coords_required

Nicolaidavies commented 6 years ago

We now have two properties under irs_record_point:

We need to update the configurations for all instances to include those two properties and make sure they are both set to true to maintain current behaviour.