{"action":"created","issue":{"url":"https://api.github.com/repos/mattermost/mattermost-server/issues/8181","repository_url":"https://api.github.com/repos/mattermost/mattermost-server","labels_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/8181/labels{/name}","comments_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/8181/comments","events_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/8181/events","html_url":"https://github.com/mattermost/mattermost-server/pull/8181","id":293664039,"number":8181,"title":"Icu 668- Sort Users in Channel by status","user":{"login":"stephenkiers","id":1245512,"avatar_url":"https://avatars0.githubusercontent.com/u/1245512?v=4","gravatar_id":"","url":"https://api.github.com/users/stephenkiers","html_url":"https://github.com/stephenkiers","followers_url":"https://api.github.com/users/stephenkiers/followers","following_url":"https://api.github.com/users/stephenkiers/following{/other_user}","gists_url":"https://api.github.com/users/stephenkiers/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenkiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenkiers/subscriptions","organizations_url":"https://api.github.com/users/stephenkiers/orgs","repos_url":"https://api.github.com/users/stephenkiers/repos","events_url":"https://api.github.com/users/stephenkiers/events{/privacy}","received_events_url":"https://api.github.com/users/stephenkiers/received_events","type":"User","site_admin":false},"labels":[{"id":297541710,"url":"https://api.github.com/repos/mattermost/mattermost-server/labels/1:%20PM%20Review","name":"1: PM Review","color":"006b75","default":false},{"id":250214574,"url":"https://api.github.com/repos/mattermost/mattermost-server/labels/2:%20Dev%20Review","name":"2: Dev Review","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":{"login":"esethna","id":14333569,"avatar_url":"https://avatars3.githubusercontent.com/u/14333569?v=4","gravatar_id":"","url":"https://api.github.com/users/esethna","html_url":"https://github.com/esethna","followers_url":"https://api.github.com/users/esethna/followers","following_url":"https://api.github.com/users/esethna/following{/other_user}","gists_url":"https://api.github.com/users/esethna/gists{/gist_id}","starred_url":"https://api.github.com/users/esethna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esethna/subscriptions","organizations_url":"https://api.github.com/users/esethna/orgs","repos_url":"https://api.github.com/users/esethna/repos","events_url":"https://api.github.com/users/esethna/events{/privacy}","received_events_url":"https://api.github.com/users/esethna/received_events","type":"User","site_admin":false},"assignees":[{"login":"esethna","id":14333569,"avatar_url":"https://avatars3.githubusercontent.com/u/14333569?v=4","gravatar_id":"","url":"https://api.github.com/users/esethna","html_url":"https://github.com/esethna","followers_url":"https://api.github.com/users/esethna/followers","following_url":"https://api.github.com/users/esethna/following{/other_user}","gists_url":"https://api.github.com/users/esethna/gists{/gist_id}","starred_url":"https://api.github.com/users/esethna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esethna/subscriptions","organizations_url":"https://api.github.com/users/esethna/orgs","repos_url":"https://api.github.com/users/esethna/repos","events_url":"https://api.github.com/users/esethna/events{/privacy}","received_events_url":"https://api.github.com/users/esethna/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-02-01T19:59:56Z","updated_at":"2018-02-02T18:12:30Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mattermost/mattermost-server/pulls/8181","html_url":"https://github.com/mattermost/mattermost-server/pull/8181","diff_url":"https://github.com/mattermost/mattermost-server/pull/8181.diff","patch_url":"https://github.com/mattermost/mattermost-server/pull/8181.patch"},"body":"Repro:\r\n1) On pre-release, go to the Contributors team, then Reception channel\r\n2) Click the person icon in the channel header\r\n\r\nExpected: Users who are online are listed first, followed by those who are away, offline and in do not disturb mode\r\n\r\nObserved: Users who are offline are listed first\r\n\r\n#### Ticket Link\r\nhttps://mattermost.atlassian.net/browse/ICU-668\r\n\r\n#### Perf Test Results\r\n\r\n- on server with 13014 users, 1 team, 12 channels, \r\n- on Channel with 6986 users (most of which did not have a Status entry, so I am not sure if that will slow down more, or not)\r\n\r\nOriginal code ran in ~20ms (120 on fresh server)\r\nNew code seems to be about 10 times slower. Completing in ~200 (300ms, on fresh server)"},"comment":{"url":"https://api.github.com/repos/mattermost/mattermost-server/issues/comments/362661772","html_url":"https://github.com/mattermost/mattermost-server/pull/8181#issuecomment-362661772","issue_url":"https://api.github.com/repos/mattermost/mattermost-server/issues/8181","id":362661772,"user":{"login":"stephenkiers","id":1245512,"avatar_url":"https://avatars0.githubusercontent.com/u/1245512?v=4","gravatar_id":"","url":"https://api.github.com/users/stephenkiers","html_url":"https://github.com/stephenkiers","followers_url":"https://api.github.com/users/stephenkiers/followers","following_url":"https://api.github.com/users/stephenkiers/following{/other_user}","gists_url":"https://api.github.com/users/stephenkiers/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenkiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenkiers/subscriptions","organizations_url":"https://api.github.com/users/stephenkiers/orgs","repos_url":"https://api.github.com/users/stephenkiers/repos","events_url":"https://api.github.com/users/stephenkiers/events{/privacy}","received_events_url":"https://api.github.com/users/stephenkiers/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T18:12:30Z","updated_at":"2018-02-02T18:12:30Z","author_association":"NONE","body":"bump (is this proper etiquette here?)"}}
{"actor":{"display_login":"stephenkiers"}}