{"action":"created","comment":{"url":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/comments/213608085","pull_request_review_id":150477567,"id":213608085,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMzYwODA4NQ==","diff_hunk":"@@ -34,32 +35,39 @@ public static DraftsResponse buildDraftResponseFromDraft(Draft draft) {\n         }\n     }\n \n-    public static DraftsResponse buildDraftResponseFromCaseData(List<Map<String, Object>> listOfCasesInCCD) {\n+    public static DraftsResponse buildDraftResponseFromCaseData(List<Map<String, Object>> listOfNonRejectedCasesInCCD) {\n \n-        if (CollectionUtils.isEmpty(listOfCasesInCCD)) {\n-            log.debug(\"No case found to build draft response\");\n-            return DraftsResponse.emptyResponse();\n-        }\n+        if (listOfNonRejectedCasesInCCD.size() == 1) {\n \n-        if (listOfCasesInCCD.size() > 1) {\n-            log.info(\"Multiple cases found. Building empty draft response\");\n-            return DraftsResponse.emptyResponse();\n+            return draftResponseBuilder(listOfNonRejectedCasesInCCD);\n+        } else {\n+            log.info(\"Multiple cases found - Multiple are not rejected\");","path":"src/main/java/uk/gov/hmcts/reform/divorce/draftservice/factory/DraftResponseFactory.java","position":46,"original_position":46,"commit_id":"49a0fef45f346b616c8395ccd950612aa90ab5d1","original_commit_id":"49a0fef45f346b616c8395ccd950612aa90ab5d1","user":{"login":"david-gimelle","id":16135604,"node_id":"MDQ6VXNlcjE2MTM1NjA0","avatar_url":"https://avatars1.githubusercontent.com/u/16135604?v=4","gravatar_id":"","url":"https://api.github.com/users/david-gimelle","html_url":"https://github.com/david-gimelle","followers_url":"https://api.github.com/users/david-gimelle/followers","following_url":"https://api.github.com/users/david-gimelle/following{/other_user}","gists_url":"https://api.github.com/users/david-gimelle/gists{/gist_id}","starred_url":"https://api.github.com/users/david-gimelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-gimelle/subscriptions","organizations_url":"https://api.github.com/users/david-gimelle/orgs","repos_url":"https://api.github.com/users/david-gimelle/repos","events_url":"https://api.github.com/users/david-gimelle/events{/privacy}","received_events_url":"https://api.github.com/users/david-gimelle/received_events","type":"User","site_admin":false},"body":"so what happen if this list is empty?","created_at":"2018-08-29T09:32:20Z","updated_at":"2018-08-29T09:32:20Z","html_url":"https://github.com/hmcts/div-case-progression-service/pull/133#discussion_r213608085","pull_request_url":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/133","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/comments/213608085"},"html":{"href":"https://github.com/hmcts/div-case-progression-service/pull/133#discussion_r213608085"},"pull_request":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/133"}}},"pull_request":{"url":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/133","id":210073812,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwMDczODEy","html_url":"https://github.com/hmcts/div-case-progression-service/pull/133","diff_url":"https://github.com/hmcts/div-case-progression-service/pull/133.diff","patch_url":"https://github.com/hmcts/div-case-progression-service/pull/133.patch","issue_url":"https://api.github.com/repos/hmcts/div-case-progression-service/issues/133","number":133,"state":"open","locked":false,"title":"[PREVIEW] DIV-2663 Resume case from CCD when multiple cases found","user":{"login":"johnoneill46","id":8027295,"node_id":"MDQ6VXNlcjgwMjcyOTU=","avatar_url":"https://avatars0.githubusercontent.com/u/8027295?v=4","gravatar_id":"","url":"https://api.github.com/users/johnoneill46","html_url":"https://github.com/johnoneill46","followers_url":"https://api.github.com/users/johnoneill46/followers","following_url":"https://api.github.com/users/johnoneill46/following{/other_user}","gists_url":"https://api.github.com/users/johnoneill46/gists{/gist_id}","starred_url":"https://api.github.com/users/johnoneill46/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnoneill46/subscriptions","organizations_url":"https://api.github.com/users/johnoneill46/orgs","repos_url":"https://api.github.com/users/johnoneill46/repos","events_url":"https://api.github.com/users/johnoneill46/events{/privacy}","received_events_url":"https://api.github.com/users/johnoneill46/received_events","type":"User","site_admin":false},"body":"# Description\r\n\r\nPlease include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.\r\n\r\nFixes # (issue)\r\n\r\n## Type of change\r\n\r\nPlease delete options that are not relevant.\r\n\r\n- [ ] Bug fix (non-breaking change which fixes an issue)\r\n- [ ] New feature (non-breaking change which adds functionality)\r\n- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)\r\n- [ ] This change requires a documentation update\r\n\r\n# How Has This Been Tested?\r\n\r\nPlease describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration\r\n\r\n\r\n**Test Configuration**:\r\n\r\n* Hardware:\r\n* O/S and version:\r\n* JDK:\r\n\r\n# Checklist:\r\n\r\n- [ ] My code follows the style guidelines of this project\r\n- [ ] I have performed a self-review of my own code\r\n- [ ] I have commented my code, particularly in hard-to-understand areas\r\n- [ ] I have made corresponding changes to the documentation\r\n- [ ] My changes generate no new warnings\r\n- [ ] I have added tests that prove my fix is effective or that my feature works\r\n- [ ] New and existing unit tests pass locally with my changes\r\n- [ ] Any dependent changes have been merged and published in downstream modules\r\n","created_at":"2018-08-22T09:36:19Z","updated_at":"2018-08-29T09:32:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c44165242d6fd5e9f32f1ce77d121dc0664476c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/133/commits","review_comments_url":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/133/comments","review_comment_url":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmcts/div-case-progression-service/issues/133/comments","statuses_url":"https://api.github.com/repos/hmcts/div-case-progression-service/statuses/49a0fef45f346b616c8395ccd950612aa90ab5d1","head":{"label":"hmcts:DIV-2663-Resume-case-from-ccd-mulitple-cases-found","ref":"DIV-2663-Resume-case-from-ccd-mulitple-cases-found","sha":"49a0fef45f346b616c8395ccd950612aa90ab5d1","user":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":121553048,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE1NTMwNDg=","name":"div-case-progression-service","full_name":"hmcts/div-case-progression-service","owner":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmcts/div-case-progression-service","description":null,"fork":false,"url":"https://api.github.com/repos/hmcts/div-case-progression-service","forks_url":"https://api.github.com/repos/hmcts/div-case-progression-service/forks","keys_url":"https://api.github.com/repos/hmcts/div-case-progression-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/div-case-progression-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/div-case-progression-service/teams","hooks_url":"https://api.github.com/repos/hmcts/div-case-progression-service/hooks","issue_events_url":"https://api.github.com/repos/hmcts/div-case-progression-service/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/div-case-progression-service/events","assignees_url":"https://api.github.com/repos/hmcts/div-case-progression-service/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/div-case-progression-service/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/div-case-progression-service/tags","blobs_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/div-case-progression-service/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/div-case-progression-service/languages","stargazers_url":"https://api.github.com/repos/hmcts/div-case-progression-service/stargazers","contributors_url":"https://api.github.com/repos/hmcts/div-case-progression-service/contributors","subscribers_url":"https://api.github.com/repos/hmcts/div-case-progression-service/subscribers","subscription_url":"https://api.github.com/repos/hmcts/div-case-progression-service/subscription","commits_url":"https://api.github.com/repos/hmcts/div-case-progression-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/div-case-progression-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/div-case-progression-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/div-case-progression-service/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/div-case-progression-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/div-case-progression-service/merges","archive_url":"https://api.github.com/repos/hmcts/div-case-progression-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/div-case-progression-service/downloads","issues_url":"https://api.github.com/repos/hmcts/div-case-progression-service/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/div-case-progression-service/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/div-case-progression-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/div-case-progression-service/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/div-case-progression-service/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/div-case-progression-service/deployments","created_at":"2018-02-14T19:38:38Z","updated_at":"2018-08-22T10:25:39Z","pushed_at":"2018-08-28T15:41:34Z","git_url":"git://github.com/hmcts/div-case-progression-service.git","ssh_url":"git@github.com:hmcts/div-case-progression-service.git","clone_url":"https://github.com/hmcts/div-case-progression-service.git","svn_url":"https://github.com/hmcts/div-case-progression-service","homepage":null,"size":3284,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":14,"watchers":2,"default_branch":"master"}},"base":{"label":"hmcts:master","ref":"master","sha":"18381d33c623c82a952390c4ae29e4789b79e196","user":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":121553048,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE1NTMwNDg=","name":"div-case-progression-service","full_name":"hmcts/div-case-progression-service","owner":{"login":"hmcts","id":22817111,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODE3MTEx","avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmcts/div-case-progression-service","description":null,"fork":false,"url":"https://api.github.com/repos/hmcts/div-case-progression-service","forks_url":"https://api.github.com/repos/hmcts/div-case-progression-service/forks","keys_url":"https://api.github.com/repos/hmcts/div-case-progression-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/div-case-progression-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/div-case-progression-service/teams","hooks_url":"https://api.github.com/repos/hmcts/div-case-progression-service/hooks","issue_events_url":"https://api.github.com/repos/hmcts/div-case-progression-service/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/div-case-progression-service/events","assignees_url":"https://api.github.com/repos/hmcts/div-case-progression-service/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/div-case-progression-service/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/div-case-progression-service/tags","blobs_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/div-case-progression-service/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/div-case-progression-service/languages","stargazers_url":"https://api.github.com/repos/hmcts/div-case-progression-service/stargazers","contributors_url":"https://api.github.com/repos/hmcts/div-case-progression-service/contributors","subscribers_url":"https://api.github.com/repos/hmcts/div-case-progression-service/subscribers","subscription_url":"https://api.github.com/repos/hmcts/div-case-progression-service/subscription","commits_url":"https://api.github.com/repos/hmcts/div-case-progression-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/div-case-progression-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/div-case-progression-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/div-case-progression-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/div-case-progression-service/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/div-case-progression-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/div-case-progression-service/merges","archive_url":"https://api.github.com/repos/hmcts/div-case-progression-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/div-case-progression-service/downloads","issues_url":"https://api.github.com/repos/hmcts/div-case-progression-service/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/div-case-progression-service/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/div-case-progression-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/div-case-progression-service/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/div-case-progression-service/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/div-case-progression-service/deployments","created_at":"2018-02-14T19:38:38Z","updated_at":"2018-08-22T10:25:39Z","pushed_at":"2018-08-28T15:41:34Z","git_url":"git://github.com/hmcts/div-case-progression-service.git","ssh_url":"git@github.com:hmcts/div-case-progression-service.git","clone_url":"https://github.com/hmcts/div-case-progression-service.git","svn_url":"https://github.com/hmcts/div-case-progression-service","homepage":null,"size":3284,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":1,"open_issues":14,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/133"},"html":{"href":"https://github.com/hmcts/div-case-progression-service/pull/133"},"issue":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/issues/133"},"comments":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/issues/133/comments"},"review_comments":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/133/comments"},"review_comment":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/pulls/133/commits"},"statuses":{"href":"https://api.github.com/repos/hmcts/div-case-progression-service/statuses/49a0fef45f346b616c8395ccd950612aa90ab5d1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"david-gimelle"}}