{"action":"created","issue":{"url":"https://api.github.com/repos/learningequality/kolibri/issues/3778","repository_url":"https://api.github.com/repos/learningequality/kolibri","labels_url":"https://api.github.com/repos/learningequality/kolibri/issues/3778/labels{/name}","comments_url":"https://api.github.com/repos/learningequality/kolibri/issues/3778/comments","events_url":"https://api.github.com/repos/learningequality/kolibri/issues/3778/events","html_url":"https://github.com/learningequality/kolibri/pull/3778","id":330786226,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzNzEwNzE0","number":3778,"title":"Fix logic for changing facility-level Roles when editing users","user":{"login":"jonboiser","id":10248067,"node_id":"MDQ6VXNlcjEwMjQ4MDY3","avatar_url":"https://avatars2.githubusercontent.com/u/10248067?v=4","gravatar_id":"","url":"https://api.github.com/users/jonboiser","html_url":"https://github.com/jonboiser","followers_url":"https://api.github.com/users/jonboiser/followers","following_url":"https://api.github.com/users/jonboiser/following{/other_user}","gists_url":"https://api.github.com/users/jonboiser/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboiser/subscriptions","organizations_url":"https://api.github.com/users/jonboiser/orgs","repos_url":"https://api.github.com/users/jonboiser/repos","events_url":"https://api.github.com/users/jonboiser/events{/privacy}","received_events_url":"https://api.github.com/users/jonboiser/received_events","type":"User","site_admin":false},"labels":[{"id":410338552,"node_id":"MDU6TGFiZWw0MTAzMzg1NTI=","url":"https://api.github.com/repos/learningequality/kolibri/labels/PR:%20needs%20review","name":"PR: needs review","color":"1f6ad6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/learningequality/kolibri/milestones/18","html_url":"https://github.com/learningequality/kolibri/milestone/18","labels_url":"https://api.github.com/repos/learningequality/kolibri/milestones/18/labels","id":3097289,"node_id":"MDk6TWlsZXN0b25lMzA5NzI4OQ==","number":18,"title":"0.10.0","description":"","creator":{"login":"indirectlylit","id":2367265,"node_id":"MDQ6VXNlcjIzNjcyNjU=","avatar_url":"https://avatars2.githubusercontent.com/u/2367265?v=4","gravatar_id":"","url":"https://api.github.com/users/indirectlylit","html_url":"https://github.com/indirectlylit","followers_url":"https://api.github.com/users/indirectlylit/followers","following_url":"https://api.github.com/users/indirectlylit/following{/other_user}","gists_url":"https://api.github.com/users/indirectlylit/gists{/gist_id}","starred_url":"https://api.github.com/users/indirectlylit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indirectlylit/subscriptions","organizations_url":"https://api.github.com/users/indirectlylit/orgs","repos_url":"https://api.github.com/users/indirectlylit/repos","events_url":"https://api.github.com/users/indirectlylit/events{/privacy}","received_events_url":"https://api.github.com/users/indirectlylit/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":136,"state":"open","created_at":"2018-02-07T17:08:38Z","updated_at":"2018-06-12T17:24:52Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2018-06-08T20:03:42Z","updated_at":"2018-06-12T17:53:26Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/learningequality/kolibri/pulls/3778","html_url":"https://github.com/learningequality/kolibri/pull/3778","diff_url":"https://github.com/learningequality/kolibri/pull/3778.diff","patch_url":"https://github.com/learningequality/kolibri/pull/3778.patch"},"body":"### Summary\r\n1. Fixes #3734 by removing `if` check with bad assumptions about `kind`\r\n1. Implements proper short-circuiting logic if user details or roles or both have not been changed\r\n1. Add a little bit of vertical space to the edit + create user forms so user kind drop down doesn't cause an overflow\r\n\r\nThe `kind` property in `state.pageState.facilityUsers` should probably be implemented as a getter, since it's even described in the code as presentational. The current logic, where `kind` is derived after receiving response from API requires a bunch of imperative updates to `kind` that might be removed.\r\n\r\n### Reviewer guidance\r\n\r\nTest:\r\n\r\n1. Changing user details (name, username, password)\r\n1. Change user facility-wide role (Learner, Facility Coach, Class Coach, Admin), esp. converting between all role kinds.\r\n1. Test changing nothing\r\n1. Test original issue (blurring the username field, then attempting to submit).\r\n\r\n### References\r\n\r\n----\r\n\r\n### Contributor Checklist\r\n\r\n- [x] Contributor has fully tested the PR manually\r\n- [x] PR has the correct target branch and milestone\r\n- [x] PR has 'needs review' or 'work-in-progress' label\r\n- [ ] If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')\r\n- [ ] If there are any front-end changes, before/after screenshots are included\r\n- [ ] If this is an important user-facing change, PR or related issue has a 'changelog' label\r\n\r\n### Reviewer Checklist\r\n\r\n- [ ] Automated test coverage is satisfactory\r\n- [ ] Reviewer has fully tested the PR manually\r\n- [ ] PR has been tested for [accessibility regressions](http://kolibri-dev.readthedocs.io/en/develop/manual_testing.html#accessibility-a11y-testing)\r\n- [ ] External dependencies files were updated (`yarn` and `pip`)\r\n- [ ] Documentation is updated\r\n- [ ] Link to diff of internal dependency change is included\r\n- [ ] CHANGELOG.rst is updated for high-level changes\r\n- [ ] Contributor is in AUTHORS.rst\r\n"},"comment":{"url":"https://api.github.com/repos/learningequality/kolibri/issues/comments/396677977","html_url":"https://github.com/learningequality/kolibri/pull/3778#issuecomment-396677977","issue_url":"https://api.github.com/repos/learningequality/kolibri/issues/3778","id":396677977,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjY3Nzk3Nw==","user":{"login":"jonboiser","id":10248067,"node_id":"MDQ6VXNlcjEwMjQ4MDY3","avatar_url":"https://avatars2.githubusercontent.com/u/10248067?v=4","gravatar_id":"","url":"https://api.github.com/users/jonboiser","html_url":"https://github.com/jonboiser","followers_url":"https://api.github.com/users/jonboiser/followers","following_url":"https://api.github.com/users/jonboiser/following{/other_user}","gists_url":"https://api.github.com/users/jonboiser/gists{/gist_id}","starred_url":"https://api.github.com/users/jonboiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonboiser/subscriptions","organizations_url":"https://api.github.com/users/jonboiser/orgs","repos_url":"https://api.github.com/users/jonboiser/repos","events_url":"https://api.github.com/users/jonboiser/events{/privacy}","received_events_url":"https://api.github.com/users/jonboiser/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T17:53:25Z","updated_at":"2018-06-12T17:53:25Z","author_association":"CONTRIBUTOR","body":"I'll have to fix it in this PR. I didn't realize the two modals were sharing the same `editUser` action. The actions should be single purpose."}}
{"actor":{"display_login":"jonboiser"}}