{"action":"created","issue":{"url":"https://api.github.com/repos/ministryofjustice/prison-visits/issues/230","labels_url":"https://api.github.com/repos/ministryofjustice/prison-visits/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits/issues/230/comments","events_url":"https://api.github.com/repos/ministryofjustice/prison-visits/issues/230/events","html_url":"https://github.com/ministryofjustice/prison-visits/pull/230","id":95450335,"number":230,"title":"Fix prison schedules to coincide with updated prison confirmation dates","user":{"login":"dan-palmer","id":1006365,"avatar_url":"https://avatars.githubusercontent.com/u/1006365?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-palmer","html_url":"https://github.com/dan-palmer","followers_url":"https://api.github.com/users/dan-palmer/followers","following_url":"https://api.github.com/users/dan-palmer/following{/other_user}","gists_url":"https://api.github.com/users/dan-palmer/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-palmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-palmer/subscriptions","organizations_url":"https://api.github.com/users/dan-palmer/orgs","repos_url":"https://api.github.com/users/dan-palmer/repos","events_url":"https://api.github.com/users/dan-palmer/events{/privacy}","received_events_url":"https://api.github.com/users/dan-palmer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"SteveMarshall","id":2210,"avatar_url":"https://avatars.githubusercontent.com/u/2210?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveMarshall","html_url":"https://github.com/SteveMarshall","followers_url":"https://api.github.com/users/SteveMarshall/followers","following_url":"https://api.github.com/users/SteveMarshall/following{/other_user}","gists_url":"https://api.github.com/users/SteveMarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveMarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveMarshall/subscriptions","organizations_url":"https://api.github.com/users/SteveMarshall/orgs","repos_url":"https://api.github.com/users/SteveMarshall/repos","events_url":"https://api.github.com/users/SteveMarshall/events{/privacy}","received_events_url":"https://api.github.com/users/SteveMarshall/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-07-16T14:50:57Z","updated_at":"2015-07-30T15:39:26Z","closed_at":"2015-07-30T15:39:16Z","pull_request":{"url":"https://api.github.com/repos/ministryofjustice/prison-visits/pulls/230","html_url":"https://github.com/ministryofjustice/prison-visits/pull/230","diff_url":"https://github.com/ministryofjustice/prison-visits/pull/230.diff","patch_url":"https://github.com/ministryofjustice/prison-visits/pull/230.patch"},"body":"#### Fix prison schedules to coincide with updated prison confirmation dates\r\n\r\n**Step one: Encapsulate prison data in a model** :tada: \r\nThis provides a class that wraps a prisons data as set in the prison config file, exposing methods to query it.\r\nIt exposes a class method for performing lookups based on a Prisons name.\r\nThe interface for an instance of the said model currently only exposes methods that are required for schedule related queries(e.g checking if a given day is one in which a prison is expected to be working).\r\n\r\n**Step two: Encapsulate prison day** :tada: \r\nDecorate a given `Date` instance with prison specific predicates to aid in determining if the day is:\r\n- a working day - help determine the confirmation email day\r\n- a day available for visiting\r\n\r\n**Step three: Enable scheduler to make use of the new functionality** :tada:\r\nProvide two methods for retrieving the range of available dates for visitation & a single date for the expected confirmation email date.\r\n\r\n **Step four: Update old interface method calls** :tada: \r\nUpdate old scheduler interactions to utilise new interface."},"comment":{"url":"https://api.github.com/repos/ministryofjustice/prison-visits/issues/comments/126373366","html_url":"https://github.com/ministryofjustice/prison-visits/pull/230#issuecomment-126373366","issue_url":"https://api.github.com/repos/ministryofjustice/prison-visits/issues/230","id":126373366,"user":{"login":"SteveMarshall","id":2210,"avatar_url":"https://avatars.githubusercontent.com/u/2210?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveMarshall","html_url":"https://github.com/SteveMarshall","followers_url":"https://api.github.com/users/SteveMarshall/followers","following_url":"https://api.github.com/users/SteveMarshall/following{/other_user}","gists_url":"https://api.github.com/users/SteveMarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveMarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveMarshall/subscriptions","organizations_url":"https://api.github.com/users/SteveMarshall/orgs","repos_url":"https://api.github.com/users/SteveMarshall/repos","events_url":"https://api.github.com/users/SteveMarshall/events{/privacy}","received_events_url":"https://api.github.com/users/SteveMarshall/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T15:39:26Z","updated_at":"2015-07-30T15:39:26Z","body":":boom: "}}