Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sites with code null should not be allowed in SiteQuestions #201

Open
broncha opened this issue Nov 13, 2017 · 3 comments
Open

sites with code null should not be allowed in SiteQuestions #201

broncha opened this issue Nov 13, 2017 · 3 comments
Labels

Comments

@broncha
Copy link
Contributor

broncha commented Nov 13, 2017

SiteQuestions with answer {"value": {"code": null}} are allowed. Sites with code null should not be allowed!

@broncha
Copy link
Contributor Author

broncha commented Nov 13, 2017

Fixed with e070732

@grassick
Copy link
Member

Example: Luke Dumbula-65LLBM (c9b41673e05d429c9cefead73e5a5719) from form a418ea5c1cc5457083d0a6f4cc473096, deployment 4a1e34d1130649aaa1da38bfba79974b and user 2a9a147253014372a445367f03f46a0e.

Question "a5b138b7290e4af0be7c2717672a5acd": {"value": {"code": null}}

Location metadata: {"accuracy": 8.5, "altitude": 695.7000122070312, "latitude": -15.6552229, "longitude": 34.8829554, "altitudeAccuracy": null}

Seeing if sanitation facility site can be found:

select * from entities.sanitation_facility where _created_by = '2a9a147253014372a445367f03f46a0e'

User created 367 sanitation facilities. _created_on is no help as set by server.

select _id, st_distance_sphere(st_setsrid(st_makepoint(34.8829554, -15.6552229), 4326), st_transform(location, 4326))
from entities.sanitation_facility where _created_by = '2a9a147253014372a445367f03f46a0e'
order by 2 asc

Finds 1 candidate: 119a4966-2472-4108-aca9-328030b2446a (6 meters away)
Malita chanthera,Near mango tree ,7903241

Not used in any other survey:

SELECT * FROM responses 
where 
form = 'a418ea5c1cc5457083d0a6f4cc473096'
and
data#>>'{a5b138b7290e4af0be7c2717672a5acd,value, code}' ='7903241'

Image metadata could give more precise date/time?

@grassick
Copy link
Member

Image is [{"id": "dea62ed1497144f19bf4d45b37ac2227", "cover": true, "rotation": 90}]

Image hasn't been uploaded yet, so not yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants