{"action":"created","issue":{"url":"https://api.github.com/repos/medic/medic-webapp/issues/2199","repository_url":"https://api.github.com/repos/medic/medic-webapp","labels_url":"https://api.github.com/repos/medic/medic-webapp/issues/2199/labels{/name}","comments_url":"https://api.github.com/repos/medic/medic-webapp/issues/2199/comments","events_url":"https://api.github.com/repos/medic/medic-webapp/issues/2199/events","html_url":"https://github.com/medic/medic-webapp/issues/2199","id":148630802,"number":2199,"title":"Can't edit some user-settings in lg.app","user":{"login":"estellecomment","id":911434,"avatar_url":"https://avatars.githubusercontent.com/u/911434?v=3","gravatar_id":"","url":"https://api.github.com/users/estellecomment","html_url":"https://github.com/estellecomment","followers_url":"https://api.github.com/users/estellecomment/followers","following_url":"https://api.github.com/users/estellecomment/following{/other_user}","gists_url":"https://api.github.com/users/estellecomment/gists{/gist_id}","starred_url":"https://api.github.com/users/estellecomment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estellecomment/subscriptions","organizations_url":"https://api.github.com/users/estellecomment/orgs","repos_url":"https://api.github.com/users/estellecomment/repos","events_url":"https://api.github.com/users/estellecomment/events{/privacy}","received_events_url":"https://api.github.com/users/estellecomment/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/medic/medic-webapp/labels/1%20-%20Scheduled","name":"1 - Scheduled","color":"bfd4d2"},{"url":"https://api.github.com/repos/medic/medic-webapp/labels/Bug","name":"Bug","color":"c10c02"}],"state":"open","locked":false,"assignee":{"login":"garethbowen","id":2064938,"avatar_url":"https://avatars.githubusercontent.com/u/2064938?v=3","gravatar_id":"","url":"https://api.github.com/users/garethbowen","html_url":"https://github.com/garethbowen","followers_url":"https://api.github.com/users/garethbowen/followers","following_url":"https://api.github.com/users/garethbowen/following{/other_user}","gists_url":"https://api.github.com/users/garethbowen/gists{/gist_id}","starred_url":"https://api.github.com/users/garethbowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethbowen/subscriptions","organizations_url":"https://api.github.com/users/garethbowen/orgs","repos_url":"https://api.github.com/users/garethbowen/repos","events_url":"https://api.github.com/users/garethbowen/events{/privacy}","received_events_url":"https://api.github.com/users/garethbowen/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/medic/medic-webapp/milestones/50","html_url":"https://github.com/medic/medic-webapp/milestones/April%2018th%20-%20May%202nd:%20Gateway%20issues,%20Release","labels_url":"https://api.github.com/repos/medic/medic-webapp/milestones/50/labels","id":1715211,"number":50,"title":"April 18th - May 2nd: Gateway issues, Release","description":"","creator":{"login":"browndav","id":763977,"avatar_url":"https://avatars.githubusercontent.com/u/763977?v=3","gravatar_id":"","url":"https://api.github.com/users/browndav","html_url":"https://github.com/browndav","followers_url":"https://api.github.com/users/browndav/followers","following_url":"https://api.github.com/users/browndav/following{/other_user}","gists_url":"https://api.github.com/users/browndav/gists{/gist_id}","starred_url":"https://api.github.com/users/browndav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/browndav/subscriptions","organizations_url":"https://api.github.com/users/browndav/orgs","repos_url":"https://api.github.com/users/browndav/repos","events_url":"https://api.github.com/users/browndav/events{/privacy}","received_events_url":"https://api.github.com/users/browndav/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":7,"state":"open","created_at":"2016-04-18T19:58:13Z","updated_at":"2016-04-25T23:08:28Z","due_on":"2016-05-02T07:00:00Z","closed_at":null},"comments":3,"created_at":"2016-04-15T11:07:33Z","updated_at":"2016-04-26T10:41:24Z","closed_at":null,"body":"(accidentally created by https://github.com/medic/medic-webapp/issues/2047)\r\nWe requires a `roles` array when updating user-settings. But some user-settings don't have a `roles` field, and so fail validation, so you can't save edits.\r\n\r\nIt's a problem for all the `2mukXXX` users, `admin`, `demo` and `trainingXX` users.\r\n\r\nScreenshot from lg.app : \r\n![screen shot 2016-04-15 at 13 03 50](https://cloud.githubusercontent.com/assets/911434/14559679/c4c7ebc4-030a-11e6-9dce-d3b20da6a016.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/medic/medic-webapp/issues/comments/214698720","html_url":"https://github.com/medic/medic-webapp/issues/2199#issuecomment-214698720","issue_url":"https://api.github.com/repos/medic/medic-webapp/issues/2199","id":214698720,"user":{"login":"garethbowen","id":2064938,"avatar_url":"https://avatars.githubusercontent.com/u/2064938?v=3","gravatar_id":"","url":"https://api.github.com/users/garethbowen","html_url":"https://github.com/garethbowen","followers_url":"https://api.github.com/users/garethbowen/followers","following_url":"https://api.github.com/users/garethbowen/following{/other_user}","gists_url":"https://api.github.com/users/garethbowen/gists{/gist_id}","starred_url":"https://api.github.com/users/garethbowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethbowen/subscriptions","organizations_url":"https://api.github.com/users/garethbowen/orgs","repos_url":"https://api.github.com/users/garethbowen/repos","events_url":"https://api.github.com/users/garethbowen/events{/privacy}","received_events_url":"https://api.github.com/users/garethbowen/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T10:41:24Z","updated_at":"2016-04-26T10:41:24Z","body":"It looks like adding the `roles` to the user settings was added to an old migration, which won't work on installations where it has already been executed. I've added a new migration to set the `roles` for all installations.\r\n\r\nAlso the user editing in the webapp had to be updated to set/update the roles."}}