{"action":"created","issue":{"url":"https://api.github.com/repos/burke-software/django-report-builder/issues/169","labels_url":"https://api.github.com/repos/burke-software/django-report-builder/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/burke-software/django-report-builder/issues/169/comments","events_url":"https://api.github.com/repos/burke-software/django-report-builder/issues/169/events","html_url":"https://github.com/burke-software/django-report-builder/pull/169","id":90146094,"number":169,"title":"Adding ability to have default fields","user":{"login":"AbhiAgarwal","id":2313562,"avatar_url":"https://avatars.githubusercontent.com/u/2313562?v=3","gravatar_id":"","url":"https://api.github.com/users/AbhiAgarwal","html_url":"https://github.com/AbhiAgarwal","followers_url":"https://api.github.com/users/AbhiAgarwal/followers","following_url":"https://api.github.com/users/AbhiAgarwal/following{/other_user}","gists_url":"https://api.github.com/users/AbhiAgarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/AbhiAgarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbhiAgarwal/subscriptions","organizations_url":"https://api.github.com/users/AbhiAgarwal/orgs","repos_url":"https://api.github.com/users/AbhiAgarwal/repos","events_url":"https://api.github.com/users/AbhiAgarwal/events{/privacy}","received_events_url":"https://api.github.com/users/AbhiAgarwal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-22T16:27:03Z","updated_at":"2015-06-24T22:52:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/burke-software/django-report-builder/pulls/169","html_url":"https://github.com/burke-software/django-report-builder/pull/169","diff_url":"https://github.com/burke-software/django-report-builder/pull/169.diff","patch_url":"https://github.com/burke-software/django-report-builder/pull/169.patch"},"body":"In my current project I needed to add the ability to add default fields that are displayed. Similar to the pull request #167 I haven't changed anything in the front-end. This is purely an addition to the JSON-endpoint and the configuration that the user is able to add.\r\n\r\nThe idea with default fields is that we wanted to automatically add certain fields when you select a particular model as displays. Currently the fields that are displayed are empty, and we wanted some way of telling the front-end what the default fields are rather than hard-coding them.\r\n\r\nThe addition here is to introduce a `defaults` field that the user can define in the ReportBuilder class that is defined in their model. Then the JSON end-point in `/fields/` would have an extra field called `is_default` that would be True or False. If the `defaults` is not defined then by default all fields in `is_default` would be set to True.\r\n\r\nLet me know of your thoughts!\r\n\r\nIf merged alongside the `can_filter` pull request then I will improve the documentation once they both get added in. In addition, (if you'd want) I would be happy to add this into the front-end in the future."},"comment":{"url":"https://api.github.com/repos/burke-software/django-report-builder/issues/comments/115037151","html_url":"https://github.com/burke-software/django-report-builder/pull/169#issuecomment-115037151","issue_url":"https://api.github.com/repos/burke-software/django-report-builder/issues/169","id":115037151,"user":{"login":"bufke","id":739307,"avatar_url":"https://avatars.githubusercontent.com/u/739307?v=3","gravatar_id":"","url":"https://api.github.com/users/bufke","html_url":"https://github.com/bufke","followers_url":"https://api.github.com/users/bufke/followers","following_url":"https://api.github.com/users/bufke/following{/other_user}","gists_url":"https://api.github.com/users/bufke/gists{/gist_id}","starred_url":"https://api.github.com/users/bufke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bufke/subscriptions","organizations_url":"https://api.github.com/users/bufke/orgs","repos_url":"https://api.github.com/users/bufke/repos","events_url":"https://api.github.com/users/bufke/events{/privacy}","received_events_url":"https://api.github.com/users/bufke/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T22:52:37Z","updated_at":"2015-06-24T22:52:37Z","body":"This is a good idea - I can see this making it easier for people to use report builder. Would you have any time to implement this on the front end?"}}