{"action":"created","issue":{"url":"https://api.github.com/repos/mysociety/yournextrepresentative/issues/812","repository_url":"https://api.github.com/repos/mysociety/yournextrepresentative","labels_url":"https://api.github.com/repos/mysociety/yournextrepresentative/issues/812/labels{/name}","comments_url":"https://api.github.com/repos/mysociety/yournextrepresentative/issues/812/comments","events_url":"https://api.github.com/repos/mysociety/yournextrepresentative/issues/812/events","html_url":"https://github.com/mysociety/yournextrepresentative/issues/812","id":147131051,"number":812,"title":"Sort candidates alphabetically for non-list posts","user":{"login":"jf1","id":4711363,"avatar_url":"https://avatars.githubusercontent.com/u/4711363?v=3","gravatar_id":"","url":"https://api.github.com/users/jf1","html_url":"https://github.com/jf1","followers_url":"https://api.github.com/users/jf1/followers","following_url":"https://api.github.com/users/jf1/following{/other_user}","gists_url":"https://api.github.com/users/jf1/gists{/gist_id}","starred_url":"https://api.github.com/users/jf1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jf1/subscriptions","organizations_url":"https://api.github.com/users/jf1/orgs","repos_url":"https://api.github.com/users/jf1/repos","events_url":"https://api.github.com/users/jf1/events{/privacy}","received_events_url":"https://api.github.com/users/jf1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-09T13:57:13Z","updated_at":"2016-04-09T15:37:12Z","closed_at":"2016-04-09T14:24:38Z","body":"As discussed with @mhl, for posts with individual candidates rather than a party list.\r\neg https://candidates.democracyclub.org.uk/election/mayor.salford.2016-05-05/post/mayor:salford/mayor-of-salford\r\n\r\nDC has no surname field so will need to sort by the last word of the candidate's full name field."},"comment":{"url":"https://api.github.com/repos/mysociety/yournextrepresentative/issues/comments/207807527","html_url":"https://github.com/mysociety/yournextrepresentative/issues/812#issuecomment-207807527","issue_url":"https://api.github.com/repos/mysociety/yournextrepresentative/issues/812","id":207807527,"user":{"login":"wfdd","id":8489551,"avatar_url":"https://avatars.githubusercontent.com/u/8489551?v=3","gravatar_id":"","url":"https://api.github.com/users/wfdd","html_url":"https://github.com/wfdd","followers_url":"https://api.github.com/users/wfdd/followers","following_url":"https://api.github.com/users/wfdd/following{/other_user}","gists_url":"https://api.github.com/users/wfdd/gists{/gist_id}","starred_url":"https://api.github.com/users/wfdd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wfdd/subscriptions","organizations_url":"https://api.github.com/users/wfdd/orgs","repos_url":"https://api.github.com/users/wfdd/repos","events_url":"https://api.github.com/users/wfdd/events{/privacy}","received_events_url":"https://api.github.com/users/wfdd/received_events","type":"User","site_admin":false},"created_at":"2016-04-09T15:37:12Z","updated_at":"2016-04-09T15:37:12Z","body":"Yes, we have `sort_name` but I don't think we're affected by this commit on closer look, since we use party lists.  (I'd added a third item in the the sort function for `sort_name` like you've done in the diff.)  It'd probably be good to swap in `sort_name` at some point in the future."}}