{"action":"created","issue":{"url":"https://api.github.com/repos/opendatakit/javarosa/issues/263","repository_url":"https://api.github.com/repos/opendatakit/javarosa","labels_url":"https://api.github.com/repos/opendatakit/javarosa/issues/263/labels{/name}","comments_url":"https://api.github.com/repos/opendatakit/javarosa/issues/263/comments","events_url":"https://api.github.com/repos/opendatakit/javarosa/issues/263/events","html_url":"https://github.com/opendatakit/javarosa/issues/263","id":300606285,"number":263,"title":"Select ones with spaces are not loaded on edit","user":{"login":"grzesiek2010","id":3276264,"avatar_url":"https://avatars1.githubusercontent.com/u/3276264?v=4","gravatar_id":"","url":"https://api.github.com/users/grzesiek2010","html_url":"https://github.com/grzesiek2010","followers_url":"https://api.github.com/users/grzesiek2010/followers","following_url":"https://api.github.com/users/grzesiek2010/following{/other_user}","gists_url":"https://api.github.com/users/grzesiek2010/gists{/gist_id}","starred_url":"https://api.github.com/users/grzesiek2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grzesiek2010/subscriptions","organizations_url":"https://api.github.com/users/grzesiek2010/orgs","repos_url":"https://api.github.com/users/grzesiek2010/repos","events_url":"https://api.github.com/users/grzesiek2010/events{/privacy}","received_events_url":"https://api.github.com/users/grzesiek2010/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-27T12:13:03Z","updated_at":"2018-02-27T14:50:23Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"#### Software versions \r\nJavaRosa v2.8.0 and older versions\r\n\r\n#### Problem description\r\nSelect ones with spaces are not loaded on edit\r\n\r\n[selectSpace.xml.txt](https://github.com/opendatakit/javarosa/files/1762519/selectSpace.xml.txt)\r\n[selectSpace.xlsx](https://github.com/opendatakit/javarosa/files/1762520/selectSpace.xlsx)\r\n\r\n#### Steps to reproduce the problem\r\n1. Load the attached form.\r\n2. Select \"za munda\" as a country and swipe.\r\n3. Confirm the country is loaded on the next page.\r\n4. Save the form, and confirm on the SD card (adb into the phone, cat the instances file) that the XML has the value\r\n5. Edit the saved form in Collect.\r\n6. Confirm that \"za munda\" is not available.\r\n7. Save the form, and confirm on the SD card (adb into the phone, cat the instances file) that the value is gone.\r\n\r\n#### Expected behavior\r\nWhen a form is loaded, all values that are persisted are loaded.\r\n\r\n#### Other information \r\nIt was originally reported in the Collect's repository https://github.com/opendatakit/collect/issues/1942\r\n\r\nI moved this issue here since it's related to Javarosa but I'm not sure if we want to fix it. \r\n\r\nThe problem is that space is used as a choice name. \r\n![screenshot from 2018-02-27 12-54-20](https://user-images.githubusercontent.com/3276264/36727400-5eaefd64-1bbd-11e8-855e-239969c2b7ad.png)\r\n\r\nWe shouldn't use spaces in option names (names not displayed labels). If I try to do that using [ODK Build](https://build.opendatakit.org/) or XLSForm I'm informed about that:\r\n![screenshot from 2018-02-27 12-56-54](https://user-images.githubusercontent.com/3276264/36727671-72e877dc-1bbe-11e8-954a-650446eacb62.png)\r\n\r\n![screenshot from 2018-02-27 13-02-48](https://user-images.githubusercontent.com/3276264/36727697-8b0e80f4-1bbe-11e8-92e0-ddf8ca20794b.png)\r\n\r\nlooks like we can fix that issue for `selectOne` pretty easy https://github.com/grzesiek2010/javarosa/commit/549d05df71c53ba0b5e56fdff959bf59d8c3ca02\r\n\r\nbut the problem will still occur for `selectMultiple`. We use spaces as separators for multiple selected choices (in xml file) so we can't allow using spaces in names. If we want to fix the issue for both widgets we should add another separator for choices and not to use space for that.\r\n\r\n@yanokwa since you have reported this issue let me know what you think."},"comment":{"url":"https://api.github.com/repos/opendatakit/javarosa/issues/comments/368902936","html_url":"https://github.com/opendatakit/javarosa/issues/263#issuecomment-368902936","issue_url":"https://api.github.com/repos/opendatakit/javarosa/issues/263","id":368902936,"user":{"login":"opendatakit-bot","id":22008766,"avatar_url":"https://avatars0.githubusercontent.com/u/22008766?v=4","gravatar_id":"","url":"https://api.github.com/users/opendatakit-bot","html_url":"https://github.com/opendatakit-bot","followers_url":"https://api.github.com/users/opendatakit-bot/followers","following_url":"https://api.github.com/users/opendatakit-bot/following{/other_user}","gists_url":"https://api.github.com/users/opendatakit-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/opendatakit-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opendatakit-bot/subscriptions","organizations_url":"https://api.github.com/users/opendatakit-bot/orgs","repos_url":"https://api.github.com/users/opendatakit-bot/repos","events_url":"https://api.github.com/users/opendatakit-bot/events{/privacy}","received_events_url":"https://api.github.com/users/opendatakit-bot/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T14:50:23Z","updated_at":"2018-02-27T14:50:23Z","author_association":"OWNER","body":"Hello @grzesiek2010!\n\nYou have attempted to claim an issue without the labels \"quick win\", \"contributor friendly\". It seems like you are new to Open Data Kit, so we suggest working on a [quick win](https://github.com/opendatakit/javarosa/issues?q=is%3Aopen+is%3Aissue+no%3Aassignee+label%3A%22quick+win%22) issue first. After doing one quick win, then try a [contributor friendly](https://github.com/opendatakit/javarosa/issues?q=is%3Aopen+is%3Aissue+no%3Aassignee+label%3A%22contributor+friendly%22) issue. We also recommend reading [README.md](https://github.com/opendatakit/javarosa/README.md) and [CONTRIBUTING.md](https://github.com/opendatakit/javarosa/CONTRIBUTING.md) before getting started.\n\nTo claim this issue anyway, comment on this issue again with the command `@opendatakit-bot claim --force`."}}
{"actor":{"display_login":"opendatakit-bot"}}