{"action":"created","comment":{"url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/comments/228103787","pull_request_review_id":168292893,"id":228103787,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODEwMzc4Nw==","diff_hunk":"@@ -13,23 +16,39 @@\n import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.AWAITING_DN_AOS_EVENT_ID;\n import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.CASE_ID_JSON_KEY;\n import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.CCD_CASE_DATA_FIELD;\n+import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.CCD_DATE_FORMAT;\n+import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.CCD_DUE_DATE;\n import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.COMPLETE_AOS_EVENT_ID;\n+import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.RECEIVED_AOS_FROM_RESP_DATE;\n import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.RESP_ADMIT_OR_CONSENT_CCD_FIELD;\n import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.RESP_DEFENDS_DIVORCE_CCD_FIELD;\n import static uk.gov.hmcts.reform.divorce.orchestration.domain.model.OrchestrationConstants.YES_VALUE;\n \n @Component\n public class SubmitAosCase implements Task<Map<String, Object>> {\n \n+    @Value(\"${aos.responded.awaiting-answer.days-to-respond}\")\n+    private int daysToRespond;\n+\n     @Autowired\n     private CaseMaintenanceClient caseMaintenanceClient;\n \n     @Override\n     public Map<String, Object> execute(TaskContext context, Map<String, Object> caseData) {\n+        String authToken = (String) context.getTransientObject(AUTH_TOKEN_JSON_KEY);\n+        String eventId = getAosCompleteEventId(caseData);\n+        String dueDate = null;\n+\n+        if (AWAITING_ANSWER_AOS_EVENT_ID.equals(eventId)) {","path":"src/main/java/uk/gov/hmcts/reform/divorce/orchestration/tasks/SubmitAosCase.java","position":39,"original_position":39,"commit_id":"0eadb403e6a067aeb6404ef18c8414bf92fc9bfc","original_commit_id":"0eadb403e6a067aeb6404ef18c8414bf92fc9bfc","user":{"login":"jvictorcf","id":21971276,"node_id":"MDQ6VXNlcjIxOTcxMjc2","avatar_url":"https://avatars3.githubusercontent.com/u/21971276?v=4","gravatar_id":"","url":"https://api.github.com/users/jvictorcf","html_url":"https://github.com/jvictorcf","followers_url":"https://api.github.com/users/jvictorcf/followers","following_url":"https://api.github.com/users/jvictorcf/following{/other_user}","gists_url":"https://api.github.com/users/jvictorcf/gists{/gist_id}","starred_url":"https://api.github.com/users/jvictorcf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvictorcf/subscriptions","organizations_url":"https://api.github.com/users/jvictorcf/orgs","repos_url":"https://api.github.com/users/jvictorcf/repos","events_url":"https://api.github.com/users/jvictorcf/events{/privacy}","received_events_url":"https://api.github.com/users/jvictorcf/received_events","type":"User","site_admin":false},"body":"I thought you were comparing a property name to the eventId?\r\nThis eventId is actually the property name where you expect to find the eventId, right?\r\nIf so, would you mind renaming the method and variable names?","created_at":"2018-10-25T09:41:08Z","updated_at":"2018-10-25T09:43:28Z","html_url":"https://github.com/hmcts/div-case-orchestration-service/pull/57#discussion_r228103787","pull_request_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/57","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/comments/228103787"},"html":{"href":"https://github.com/hmcts/div-case-orchestration-service/pull/57#discussion_r228103787"},"pull_request":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/57","id":224673578,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NjczNTc4","html_url":"https://github.com/hmcts/div-case-orchestration-service/pull/57","diff_url":"https://github.com/hmcts/div-case-orchestration-service/pull/57.diff","patch_url":"https://github.com/hmcts/div-case-orchestration-service/pull/57.patch","issue_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues/57","number":57,"state":"open","locked":false,"title":"Set due date","user":{"login":"mthava","id":36265472,"node_id":"MDQ6VXNlcjM2MjY1NDcy","avatar_url":"https://avatars3.githubusercontent.com/u/36265472?v=4","gravatar_id":"","url":"https://api.github.com/users/mthava","html_url":"https://github.com/mthava","followers_url":"https://api.github.com/users/mthava/followers","following_url":"https://api.github.com/users/mthava/following{/other_user}","gists_url":"https://api.github.com/users/mthava/gists{/gist_id}","starred_url":"https://api.github.com/users/mthava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mthava/subscriptions","organizations_url":"https://api.github.com/users/mthava/orgs","repos_url":"https://api.github.com/users/mthava/repos","events_url":"https://api.github.com/users/mthava/events{/privacy}","received_events_url":"https://api.github.com/users/mthava/received_events","type":"User","site_admin":false},"body":"# Description\r\n\r\nSet AOS due date for Defended\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-10-22T13:02:00Z","updated_at":"2018-10-25T09:43:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e67bcb720a770f5b4233cb74f0e92b8509e5147","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1100444477,"node_id":"MDU6TGFiZWwxMTAwNDQ0NDc3","url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/labels/ns:div-cos-pr-57","name":"ns:div-cos-pr-57","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/57/commits","review_comments_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/57/comments","review_comment_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues/57/comments","statuses_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/statuses/0eadb403e6a067aeb6404ef18c8414bf92fc9bfc","head":{"label":"hmcts:SetDueDate","ref":"SetDueDate","sha":"0eadb403e6a067aeb6404ef18c8414bf92fc9bfc","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":142584193,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI1ODQxOTM=","name":"div-case-orchestration-service","full_name":"hmcts/div-case-orchestration-service","private":false,"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},"html_url":"https://github.com/hmcts/div-case-orchestration-service","description":"Divorce service to handle case orchestration","fork":false,"url":"https://api.github.com/repos/hmcts/div-case-orchestration-service","forks_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/forks","keys_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/teams","hooks_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/hooks","issue_events_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/events","assignees_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/tags","blobs_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/languages","stargazers_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/stargazers","contributors_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/contributors","subscribers_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/subscribers","subscription_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/subscription","commits_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/merges","archive_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/downloads","issues_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/deployments","created_at":"2018-07-27T14:00:58Z","updated_at":"2018-10-25T08:45:19Z","pushed_at":"2018-10-25T08:45:20Z","git_url":"git://github.com/hmcts/div-case-orchestration-service.git","ssh_url":"git@github.com:hmcts/div-case-orchestration-service.git","clone_url":"https://github.com/hmcts/div-case-orchestration-service.git","svn_url":"https://github.com/hmcts/div-case-orchestration-service","homepage":null,"size":1799,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"hmcts:master","ref":"master","sha":"b9aabf197359cb29dc0632eb8936ec009157c8a2","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":142584193,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI1ODQxOTM=","name":"div-case-orchestration-service","full_name":"hmcts/div-case-orchestration-service","private":false,"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},"html_url":"https://github.com/hmcts/div-case-orchestration-service","description":"Divorce service to handle case orchestration","fork":false,"url":"https://api.github.com/repos/hmcts/div-case-orchestration-service","forks_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/forks","keys_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/teams","hooks_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/hooks","issue_events_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/events","assignees_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/tags","blobs_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/languages","stargazers_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/stargazers","contributors_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/contributors","subscribers_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/subscribers","subscription_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/subscription","commits_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/merges","archive_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/downloads","issues_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/div-case-orchestration-service/deployments","created_at":"2018-07-27T14:00:58Z","updated_at":"2018-10-25T08:45:19Z","pushed_at":"2018-10-25T08:45:20Z","git_url":"git://github.com/hmcts/div-case-orchestration-service.git","ssh_url":"git@github.com:hmcts/div-case-orchestration-service.git","clone_url":"https://github.com/hmcts/div-case-orchestration-service.git","svn_url":"https://github.com/hmcts/div-case-orchestration-service","homepage":null,"size":1799,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/57"},"html":{"href":"https://github.com/hmcts/div-case-orchestration-service/pull/57"},"issue":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues/57"},"comments":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/hmcts/div-case-orchestration-service/statuses/0eadb403e6a067aeb6404ef18c8414bf92fc9bfc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jvictorcf"}}