{"action":"created","comment":{"url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/comments/63535624","id":63535624,"diff_hunk":"@@ -382,7 +382,22 @@ trait CalculationController extends FrontendController {\n       errors => Future.successful(BadRequest(calculation.disposalCosts(errors))),\n       success => {\n         calcConnector.saveFormData(KeystoreKeys.disposalCosts, success)\n-        Future.successful(Redirect(routes.CalculationController.entrepreneursRelief()))\n+        calcConnector.fetchAndGetFormData[AcquisitionDateModel](KeystoreKeys.acquisitionDate).flatMap {\n+          case Some(data) => data.hasAcquisitionDate match {\n+            case \"Yes\" =>\n+              Future.successful(Redirect(routes.CalculationController.privateResidenceRelief()))\n+            case \"No\" => {","path":"app/controllers/CalculationController.scala","position":9,"original_position":9,"commit_id":"977b49009e5951091c64014f7a4b5fcbc25592f4","original_commit_id":"977b49009e5951091c64014f7a4b5fcbc25592f4","user":{"login":"MJCallahanPage","id":16954819,"avatar_url":"https://avatars.githubusercontent.com/u/16954819?v=3","gravatar_id":"","url":"https://api.github.com/users/MJCallahanPage","html_url":"https://github.com/MJCallahanPage","followers_url":"https://api.github.com/users/MJCallahanPage/followers","following_url":"https://api.github.com/users/MJCallahanPage/following{/other_user}","gists_url":"https://api.github.com/users/MJCallahanPage/gists{/gist_id}","starred_url":"https://api.github.com/users/MJCallahanPage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MJCallahanPage/subscriptions","organizations_url":"https://api.github.com/users/MJCallahanPage/orgs","repos_url":"https://api.github.com/users/MJCallahanPage/repos","events_url":"https://api.github.com/users/MJCallahanPage/events{/privacy}","received_events_url":"https://api.github.com/users/MJCallahanPage/received_events","type":"User","site_admin":false},"body":"What if it's not Yes or No. This would result in an inexhaustive case statement as there is no `case _` leg.\r\n\r\nWhat might be better is:\r\n\r\n```\r\ncase Some(data) if data.hasAcquisitionDate == \"Yes\" => match {\r\n   Future.successful(Redirect(routes.CalculationController.privateResidenceRelief()))\r\ncase _ => {\r\n    calcConnector.fetchAndGetFormData[RebasedValueModel](KeystoreKeys.rebasedValue).flatMap {\r\n        case Some(rebasedData) if rebasedData.hasRebasedValue == \"Yes\" => {\r\n           Future.successful(Redirect(routes.CalculationController.privateResidenceRelief()))\r\n        }\r\n        case _ => {\r\n            Future.successful(Redirect(routes.CalculationController.entrepreneursRelief()))\r\n         }\r\n    }\r\n```\r\n\r\n","created_at":"2016-05-17T14:46:46Z","updated_at":"2016-05-17T14:46:46Z","html_url":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/190#discussion_r63535624","pull_request_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/190","_links":{"self":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/comments/63535624"},"html":{"href":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/190#discussion_r63535624"},"pull_request":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/190"}}},"pull_request":{"url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/190","id":70192548,"html_url":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/190","diff_url":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/190.diff","patch_url":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/190.patch","issue_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/190","number":190,"state":"open","locked":false,"title":"CGT-861 Amended Disposal Costs routing to PRR","user":{"login":"miranda-hawkes","id":17408278,"avatar_url":"https://avatars.githubusercontent.com/u/17408278?v=3","gravatar_id":"","url":"https://api.github.com/users/miranda-hawkes","html_url":"https://github.com/miranda-hawkes","followers_url":"https://api.github.com/users/miranda-hawkes/followers","following_url":"https://api.github.com/users/miranda-hawkes/following{/other_user}","gists_url":"https://api.github.com/users/miranda-hawkes/gists{/gist_id}","starred_url":"https://api.github.com/users/miranda-hawkes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miranda-hawkes/subscriptions","organizations_url":"https://api.github.com/users/miranda-hawkes/orgs","repos_url":"https://api.github.com/users/miranda-hawkes/repos","events_url":"https://api.github.com/users/miranda-hawkes/events{/privacy}","received_events_url":"https://api.github.com/users/miranda-hawkes/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-16T12:56:23Z","updated_at":"2016-05-17T14:46:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2d60c8bfb9b40d27b65c7c294cdbc18ac73b5175","assignee":{"login":"MJCallahanPage","id":16954819,"avatar_url":"https://avatars.githubusercontent.com/u/16954819?v=3","gravatar_id":"","url":"https://api.github.com/users/MJCallahanPage","html_url":"https://github.com/MJCallahanPage","followers_url":"https://api.github.com/users/MJCallahanPage/followers","following_url":"https://api.github.com/users/MJCallahanPage/following{/other_user}","gists_url":"https://api.github.com/users/MJCallahanPage/gists{/gist_id}","starred_url":"https://api.github.com/users/MJCallahanPage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MJCallahanPage/subscriptions","organizations_url":"https://api.github.com/users/MJCallahanPage/orgs","repos_url":"https://api.github.com/users/MJCallahanPage/repos","events_url":"https://api.github.com/users/MJCallahanPage/events{/privacy}","received_events_url":"https://api.github.com/users/MJCallahanPage/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/190/commits","review_comments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/190/comments","review_comment_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/190/comments","statuses_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/statuses/977b49009e5951091c64014f7a4b5fcbc25592f4","head":{"label":"hmrc:CGT-861","ref":"CGT-861","sha":"977b49009e5951091c64014f7a4b5fcbc25592f4","user":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":53857643,"name":"capital-gains-calculator-frontend","full_name":"hmrc/capital-gains-calculator-frontend","owner":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/capital-gains-calculator-frontend","description":"","fork":false,"url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend","forks_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/forks","keys_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/teams","hooks_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/events","assignees_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/tags","blobs_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/languages","stargazers_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/subscription","commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/merges","archive_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/downloads","issues_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/deployments","created_at":"2016-03-14T13:18:41Z","updated_at":"2016-03-15T14:12:30Z","pushed_at":"2016-05-17T14:40:54Z","git_url":"git://github.com/hmrc/capital-gains-calculator-frontend.git","ssh_url":"git@github.com:hmrc/capital-gains-calculator-frontend.git","clone_url":"https://github.com/hmrc/capital-gains-calculator-frontend.git","svn_url":"https://github.com/hmrc/capital-gains-calculator-frontend","homepage":"","size":768,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"hmrc:master","ref":"master","sha":"e2ee4858586d9308698a1f86dbaf888b0f0d7b9e","user":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"repo":{"id":53857643,"name":"capital-gains-calculator-frontend","full_name":"hmrc/capital-gains-calculator-frontend","owner":{"login":"hmrc","id":5755339,"avatar_url":"https://avatars.githubusercontent.com/u/5755339?v=3","gravatar_id":"","url":"https://api.github.com/users/hmrc","html_url":"https://github.com/hmrc","followers_url":"https://api.github.com/users/hmrc/followers","following_url":"https://api.github.com/users/hmrc/following{/other_user}","gists_url":"https://api.github.com/users/hmrc/gists{/gist_id}","starred_url":"https://api.github.com/users/hmrc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmrc/subscriptions","organizations_url":"https://api.github.com/users/hmrc/orgs","repos_url":"https://api.github.com/users/hmrc/repos","events_url":"https://api.github.com/users/hmrc/events{/privacy}","received_events_url":"https://api.github.com/users/hmrc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmrc/capital-gains-calculator-frontend","description":"","fork":false,"url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend","forks_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/forks","keys_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/teams","hooks_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/hooks","issue_events_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/events","assignees_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/tags","blobs_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/languages","stargazers_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/stargazers","contributors_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/contributors","subscribers_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/subscribers","subscription_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/subscription","commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/merges","archive_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/downloads","issues_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/labels{/name}","releases_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/deployments","created_at":"2016-03-14T13:18:41Z","updated_at":"2016-03-15T14:12:30Z","pushed_at":"2016-05-17T14:40:54Z","git_url":"git://github.com/hmrc/capital-gains-calculator-frontend.git","ssh_url":"git@github.com:hmrc/capital-gains-calculator-frontend.git","clone_url":"https://github.com/hmrc/capital-gains-calculator-frontend.git","svn_url":"https://github.com/hmrc/capital-gains-calculator-frontend","homepage":"","size":768,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/190"},"html":{"href":"https://github.com/hmrc/capital-gains-calculator-frontend/pull/190"},"issue":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/190"},"comments":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/hmrc/capital-gains-calculator-frontend/statuses/977b49009e5951091c64014f7a4b5fcbc25592f4"}}}}