{"action":"created","issue":{"url":"https://api.github.com/repos/opendatakit/collect/issues/1804","repository_url":"https://api.github.com/repos/opendatakit/collect","labels_url":"https://api.github.com/repos/opendatakit/collect/issues/1804/labels{/name}","comments_url":"https://api.github.com/repos/opendatakit/collect/issues/1804/comments","events_url":"https://api.github.com/repos/opendatakit/collect/issues/1804/events","html_url":"https://github.com/opendatakit/collect/pull/1804","id":290980847,"number":1804,"title":"Selected server google account","user":{"login":"marcparicio","id":22030461,"avatar_url":"https://avatars1.githubusercontent.com/u/22030461?v=4","gravatar_id":"","url":"https://api.github.com/users/marcparicio","html_url":"https://github.com/marcparicio","followers_url":"https://api.github.com/users/marcparicio/followers","following_url":"https://api.github.com/users/marcparicio/following{/other_user}","gists_url":"https://api.github.com/users/marcparicio/gists{/gist_id}","starred_url":"https://api.github.com/users/marcparicio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcparicio/subscriptions","organizations_url":"https://api.github.com/users/marcparicio/orgs","repos_url":"https://api.github.com/users/marcparicio/repos","events_url":"https://api.github.com/users/marcparicio/events{/privacy}","received_events_url":"https://api.github.com/users/marcparicio/received_events","type":"User","site_admin":false},"labels":[{"id":631529059,"url":"https://api.github.com/repos/opendatakit/collect/labels/needs%20testing","name":"needs testing","color":"fbca04","default":false},{"id":688526012,"url":"https://api.github.com/repos/opendatakit/collect/labels/reviewed","name":"reviewed","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-01-23T20:25:01Z","updated_at":"2018-02-05T04:22:16Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/opendatakit/collect/pulls/1804","html_url":"https://github.com/opendatakit/collect/pull/1804","diff_url":"https://github.com/opendatakit/collect/pull/1804.diff","patch_url":"https://github.com/opendatakit/collect/pull/1804.patch"},"body":"Closes #1786 \r\n\r\n#### What has been done to verify that this works as intended?\r\n\r\nI tested manually the possible situations opening the Google Account Picker Dialog and all of them worked properly:\r\n\r\n- Opening the dialog without any Google account added redirects to the Google login page.\r\n- Opening the dialog with one or more Google accounts added but none of them selected checks the first one.\r\n- Opening the dialog with one or more Google accounts added and one of them selected checks the one that was selected.\r\n\r\n#### Why is this the best possible solution? Were any other approaches considered?\r\n\r\nThis is the only approach I considered, the intent that starts the Picker Dialog  just needed to be updated before starting the activity.\r\n\r\n#### Are there any risks to merging this code? If so, what are they?\r\n\r\nI wrote just a few lines of code that check if there is a Google account stored in Preferences, so I don't think there is any risk merging the code.\r\n\r\n#### Do we need any specific form for testing your changes? If so, please attach one.\r\n\r\nIt can be tested with a device/emulator following the 'Steps to reproduce the problem' of the issue. "},"comment":{"url":"https://api.github.com/repos/opendatakit/collect/issues/comments/362978042","html_url":"https://github.com/opendatakit/collect/pull/1804#issuecomment-362978042","issue_url":"https://api.github.com/repos/opendatakit/collect/issues/1804","id":362978042,"user":{"login":"lognaturel","id":967540,"avatar_url":"https://avatars3.githubusercontent.com/u/967540?v=4","gravatar_id":"","url":"https://api.github.com/users/lognaturel","html_url":"https://github.com/lognaturel","followers_url":"https://api.github.com/users/lognaturel/followers","following_url":"https://api.github.com/users/lognaturel/following{/other_user}","gists_url":"https://api.github.com/users/lognaturel/gists{/gist_id}","starred_url":"https://api.github.com/users/lognaturel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lognaturel/subscriptions","organizations_url":"https://api.github.com/users/lognaturel/orgs","repos_url":"https://api.github.com/users/lognaturel/repos","events_url":"https://api.github.com/users/lognaturel/events{/privacy}","received_events_url":"https://api.github.com/users/lognaturel/received_events","type":"User","site_admin":false},"created_at":"2018-02-05T04:22:16Z","updated_at":"2018-02-05T04:22:16Z","author_association":"MEMBER","body":"Thank you @marcparicio!\r\n\r\n@mmarciniak90 Do you think that toast is actually useful? I'd tend to say we should remove it everywhere."}}
{"actor":{"display_login":"lognaturel"}}