{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/whitehall/issues/2191","labels_url":"https://api.github.com/repos/alphagov/whitehall/issues/2191/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/whitehall/issues/2191/comments","events_url":"https://api.github.com/repos/alphagov/whitehall/issues/2191/events","html_url":"https://github.com/alphagov/whitehall/pull/2191","id":79015708,"number":2191,"title":"DocumentHistory handles adopted supporting pages","user":{"login":"tekin","id":3687,"avatar_url":"https://avatars.githubusercontent.com/u/3687?v=3","gravatar_id":"","url":"https://api.github.com/users/tekin","html_url":"https://github.com/tekin","followers_url":"https://api.github.com/users/tekin/followers","following_url":"https://api.github.com/users/tekin/following{/other_user}","gists_url":"https://api.github.com/users/tekin/gists{/gist_id}","starred_url":"https://api.github.com/users/tekin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tekin/subscriptions","organizations_url":"https://api.github.com/users/tekin/orgs","repos_url":"https://api.github.com/users/tekin/repos","events_url":"https://api.github.com/users/tekin/events{/privacy}","received_events_url":"https://api.github.com/users/tekin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-21T14:21:11Z","updated_at":"2015-05-22T07:28:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/alphagov/whitehall/pulls/2191","html_url":"https://github.com/alphagov/whitehall/pull/2191","diff_url":"https://github.com/alphagov/whitehall/pull/2191.diff","patch_url":"https://github.com/alphagov/whitehall/pull/2191.patch"},"body":"This fixes an issue that results in a strange document history on policies that\r\nadopt previously-published supporting pages from other policies.\r\n\r\nPolicies can linked to supporting pages that have already been published with\r\nanother policy. In such a case, it is possible that the supporting page will\r\nhave been published before the policy itself. This can results in a strange\r\nchange history where the entry for the supporting page appears before that of\r\nthe policy's \"First published.\" change note. This updates the code such that any\r\nchange notes on supporting pages published before the policy itself are ignored,\r\nresulting in a more accurate change history.\r\n\r\nBefore: \r\n\r\n![screen shot 2015-05-21 at 15 21 41](https://cloud.githubusercontent.com/assets/3687/7750675/723b4a04-ffcd-11e4-9883-959ca30dc3dc.png)\r\n\r\nAfter:\r\n\r\n![screen shot 2015-05-21 at 15 22 38](https://cloud.githubusercontent.com/assets/3687/7750677/761a1d44-ffcd-11e4-8917-8cb47f469f78.png)\r\n\r\n\r\nNote: this change is needed for some work that will back-fill the policy history onto the publications that replaced them in whitehall: https://trello.com/c/Gxkzqtpf/197-backfill-change-history-on-html-policy-publications"},"comment":{"url":"https://api.github.com/repos/alphagov/whitehall/issues/comments/104546330","html_url":"https://github.com/alphagov/whitehall/pull/2191#issuecomment-104546330","issue_url":"https://api.github.com/repos/alphagov/whitehall/issues/2191","id":104546330,"user":{"login":"bmwelby","id":1433495,"avatar_url":"https://avatars.githubusercontent.com/u/1433495?v=3","gravatar_id":"","url":"https://api.github.com/users/bmwelby","html_url":"https://github.com/bmwelby","followers_url":"https://api.github.com/users/bmwelby/followers","following_url":"https://api.github.com/users/bmwelby/following{/other_user}","gists_url":"https://api.github.com/users/bmwelby/gists{/gist_id}","starred_url":"https://api.github.com/users/bmwelby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmwelby/subscriptions","organizations_url":"https://api.github.com/users/bmwelby/orgs","repos_url":"https://api.github.com/users/bmwelby/repos","events_url":"https://api.github.com/users/bmwelby/events{/privacy}","received_events_url":"https://api.github.com/users/bmwelby/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T07:28:54Z","updated_at":"2015-05-22T07:28:54Z","body":"But my thinking is flawed because this only scrubs the stuff from before the first published date, which is fine.\r\n\r\nSo it's all good."}}