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

Multiple value select: double values written sometimes #121

Closed
PaulUithol opened this issue Jan 9, 2016 · 8 comments
Closed

Multiple value select: double values written sometimes #121

PaulUithol opened this issue Jan 9, 2016 · 8 comments
Labels

Comments

@PaulUithol
Copy link

I haven't been able to figure out exactly what triggers this yet; but sometimes, the complete value string seems to be written out twice (both when selecting just a single option, or selecting multiple).

Entering OMK again (either to retag a node, or as part of another form) does seem to be a prerequisite though. The doubled up string is also written out into the .osm file.

screenshot_2016-01-09-19-36-07
screenshot_2016-01-09-19-37-12

@hallahan
Copy link
Contributor

hallahan commented Jan 9, 2016

Could you send me the specifc XLS form and OSM data used? I think I understand the workflow you are describing. This only happens when revisiting a node that you previously tagged?

I'm thinking I could filter out duplicate tokens from the given string, but I'd like to know the underlying cause. This issue should piggy-back with #120 with a fix that solves both problems.

@hallahan hallahan added the bug label Jan 9, 2016
@PaulUithol
Copy link
Author

This seems to be quite a serious one; seeing it on all the phones, with different data (Kampala or Mbale) and different form versions. I've cut it down to using just one form, no osm data, one mbtiles for background.

Form: https://drive.google.com/open?id=0Bx3_hrMYdNwLUV9RZXF6U0pKb1U
Mbtiles: https://drive.google.com/open?id=0Bx3_hrMYdNwLN0taTUJUbXZWdTg

One sequence that certainly seems to trigger it:

  1. Add a POI (mobile money agent form). Set amentiy=mobile_money_agent and select a couple of networks (for example, network=Airtel Money;MTN Mobile Money). Then save, go to end, exit & finalize form.
  2. Add another POI (mobile money agent form). Set amentiy=mobile_money_agent and select a couple of networks. Then save, go to end, exit & finalize form.
  3. Go to "Edit saved form", go to the first one, "Redo OSM tagging", and for both points look at the amenity and network values. Usually, at least one of them is doubled up now.

@PaulUithol
Copy link
Author

It keeps adding values as well; I've seen them with yes;yes;yes for a yes/no question.

@hallahan
Copy link
Contributor

Troubleshooting today.

@hallahan
Copy link
Contributor

I think this problem is due to bug #115. It looks like this got introduced when we started putting timestamps on the file name. This made a unique file name on each write. I'm wondering if ODK collect rewrites media attachments (OSM files) when finalizing a form...

screenshot 2016-01-10 13 05 27

@PaulUithol
Copy link
Author

Not quite sure if that's connected? Just had one go from
mobile_money_agent to mobile_money_agent; mobile_money_agent; mobile_money_agent; mobile_money_agent; mobile_money_agent in one save
(amenity), but network is still okay. So it seems to be an issue per key,
not the whole file? Only see one .osm file as well.
On Jan 11, 2016 12:07 AM, "Nicholas Hallahan" [email protected]
wrote:

I think this problem is due to bug #115
#115. It
looks like this got introduced when we started putting timestamps on the
file name. This made a unique file name on each write. I'm wondering if ODK
collect rewrites media attachments (OSM files) when finalizing a form...

[image: screenshot 2016-01-10 13 05 27]
https://cloud.githubusercontent.com/assets/556367/12224001/0f17f95a-b79b-11e5-8beb-c9420a49a1ef.png


Reply to this email directly or view it on GitHub
#121 (comment)
.

@hallahan
Copy link
Contributor

This bug is really inconsistent. I was able to reproduce it a few times, doing your workflow, and not it doesn't seem to happen anymore... I think you are right, that it's a per key issue.

@hallahan
Copy link
Contributor

Regardless, I think putting all of the tag values that I'm gathering into a HashSet will guarantee that the set has unique values.

http://developer.android.com/reference/java/util/HashSet.html

Then, I'll iterate through that hash set, putting in ; with that.

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