{"action":"created","issue":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2558","repository_url":"https://api.github.com/repos/cfpb/cfgov-refresh","labels_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2558/labels{/name}","comments_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2558/comments","events_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2558/events","html_url":"https://github.com/cfpb/cfgov-refresh/pull/2558","id":191359024,"number":2558,"title":"Limit Newsroom content to Blog/Newsroom posts","user":{"login":"chosak","id":654645,"avatar_url":"https://avatars.githubusercontent.com/u/654645?v=3","gravatar_id":"","url":"https://api.github.com/users/chosak","html_url":"https://github.com/chosak","followers_url":"https://api.github.com/users/chosak/followers","following_url":"https://api.github.com/users/chosak/following{/other_user}","gists_url":"https://api.github.com/users/chosak/gists{/gist_id}","starred_url":"https://api.github.com/users/chosak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chosak/subscriptions","organizations_url":"https://api.github.com/users/chosak/orgs","repos_url":"https://api.github.com/users/chosak/repos","events_url":"https://api.github.com/users/chosak/events{/privacy}","received_events_url":"https://api.github.com/users/chosak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-23T19:17:45Z","updated_at":"2016-11-28T18:12:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/pulls/2558","html_url":"https://github.com/cfpb/cfgov-refresh/pull/2558","diff_url":"https://github.com/cfpb/cfgov-refresh/pull/2558.diff","patch_url":"https://github.com/cfpb/cfgov-refresh/pull/2558.patch"},"body":"This PR corrects an issue where `NewsroomLandingPage` pages (such as [the Newsroom page](http://www.consumerfinance.gov/about-us/newsroom/)) were showing posts that didn't belong there.\r\n\r\nThis change makes it so that `NewsroomLandingPage` pages will always show all Wagtail pages that inherit from `AbstractFilterablePage` (e.g. `BlogPage`, `LearnPage`, `DocumentDetailPage`, `EventPage`, and `NewsroomPage`) *and* are tagged with at least one category from the Blog or Newsroom sets defined [here](https://github.com/cfpb/cfgov-refresh/blob/master/cfgov/v1/util/ref.py#L51)).\r\n\r\n## Additions\r\n\r\n- Unit tests for `v1.models.base.CFGOVPageQuerySet` and its `live_shared` functionality.\r\n\r\n## Changes\r\n\r\n- Corrected Newsroom page behavior.\r\n- Replaced one use of `os.environ.get('DJANGO_STAGING_HOSTNAME')` with `settings.STAGING_HOSTNAME`.\r\n\r\n## Testing\r\n\r\n- This is most easily tested with a production data dump. Run a local server and navigate to [http://localhost:8000/about-us/newsroom/](http://localhost:8000/about-us/newsroom/). You should notice that all links lead either back to the (filtered) Newsroom page or to the (filtered) Blog index page. All posts should be labeled with either \"Blog\", \"Op-Ed\", \"Press Release\", \"Speech\", or \"Testimony\".\r\n\r\n## Review\r\n\r\n- @schaferjh @richaagarwal @cfpb/cfgov-backends \r\n\r\n## Checklist\r\n\r\n* [X] Changes are limited to a single goal (no scope creep)\r\n* [X] Code can be automatically merged (no conflicts)\r\n* [ ] Code follows the standards laid out in the [front end playbook](https://github.com/cfpb/front-end)\r\n* [X] Passes all existing automated tests\r\n* [X] New functions include new tests\r\n* [ ] New functions are documented (with a description, list of inputs, and expected output)\r\n* [ ] Placeholder code is flagged\r\n* [ ] Visually tested in supported browsers and devices\r\n* [X] Project documentation has been updated (including the \"Unreleased\" section of the CHANGELOG)\r\n"},"comment":{"url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/comments/263347983","html_url":"https://github.com/cfpb/cfgov-refresh/pull/2558#issuecomment-263347983","issue_url":"https://api.github.com/repos/cfpb/cfgov-refresh/issues/2558","id":263347983,"user":{"login":"richaagarwal","id":354591,"avatar_url":"https://avatars.githubusercontent.com/u/354591?v=3","gravatar_id":"","url":"https://api.github.com/users/richaagarwal","html_url":"https://github.com/richaagarwal","followers_url":"https://api.github.com/users/richaagarwal/followers","following_url":"https://api.github.com/users/richaagarwal/following{/other_user}","gists_url":"https://api.github.com/users/richaagarwal/gists{/gist_id}","starred_url":"https://api.github.com/users/richaagarwal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richaagarwal/subscriptions","organizations_url":"https://api.github.com/users/richaagarwal/orgs","repos_url":"https://api.github.com/users/richaagarwal/repos","events_url":"https://api.github.com/users/richaagarwal/events{/privacy}","received_events_url":"https://api.github.com/users/richaagarwal/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T18:12:54Z","updated_at":"2016-11-28T18:12:54Z","body":"👍  I think we can do something similar for the ActivityLogPage, & then continue to think about how to make this configurable in the editor instead."}}
{"actor":{"display_login":"richaagarwal"}}