{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3262","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3262/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3262/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3262/events","html_url":"https://github.com/silverstripe/silverstripe-framework/issues/3262","id":37165807,"number":3262,"title":"add group by to datalist","user":{"login":"LensArt","id":2277977,"avatar_url":"https://avatars.githubusercontent.com/u/2277977?v=3","gravatar_id":"","url":"https://api.github.com/users/LensArt","html_url":"https://github.com/LensArt","followers_url":"https://api.github.com/users/LensArt/followers","following_url":"https://api.github.com/users/LensArt/following{/other_user}","gists_url":"https://api.github.com/users/LensArt/gists{/gist_id}","starred_url":"https://api.github.com/users/LensArt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LensArt/subscriptions","organizations_url":"https://api.github.com/users/LensArt/orgs","repos_url":"https://api.github.com/users/LensArt/repos","events_url":"https://api.github.com/users/LensArt/events{/privacy}","received_events_url":"https://api.github.com/users/LensArt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/labels/change/patch","name":"change/patch","color":"fef2c0"},{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/labels/type/enhancement","name":"type/enhancement","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-07-04T12:56:24Z","updated_at":"2015-10-14T20:55:24Z","closed_at":null,"body":"Since group by is added to data query we would like to add it to datalist, so we can use it within the orm, something like:\r\n\r\n```PHP\r\n\r\n\t/**\r\n\t * Return a new DataList instance with the records returned in this query\r\n\t * with an added group by.\r\n\t *\r\n\t * @param string fieldName\r\n\t */\r\n\tpublic function groupby($groupby) {\r\n\t\treturn $this->alterDataQuery(function($query) use ($groupby){\r\n\t\t\t$query->groupby($groupby);\r\n\t\t});\r\n\t}\r\n```"},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/comments/148197494","html_url":"https://github.com/silverstripe/silverstripe-framework/issues/3262#issuecomment-148197494","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-framework/issues/3262","id":148197494,"user":{"login":"mediabeastnz","id":909749,"avatar_url":"https://avatars.githubusercontent.com/u/909749?v=3","gravatar_id":"","url":"https://api.github.com/users/mediabeastnz","html_url":"https://github.com/mediabeastnz","followers_url":"https://api.github.com/users/mediabeastnz/followers","following_url":"https://api.github.com/users/mediabeastnz/following{/other_user}","gists_url":"https://api.github.com/users/mediabeastnz/gists{/gist_id}","starred_url":"https://api.github.com/users/mediabeastnz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mediabeastnz/subscriptions","organizations_url":"https://api.github.com/users/mediabeastnz/orgs","repos_url":"https://api.github.com/users/mediabeastnz/repos","events_url":"https://api.github.com/users/mediabeastnz/events{/privacy}","received_events_url":"https://api.github.com/users/mediabeastnz/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T20:55:23Z","updated_at":"2015-10-14T20:55:23Z","body":"Is this still a possible option?"}}