{"action":"created","comment":{"url":"https://api.github.com/repos/motech-implementations/nms/pulls/comments/72700971","id":72700971,"diff_hunk":"@@ -375,7 +414,36 @@ private MctsImportAudit saveImportedAnmAshaData(AnmAshaDataSet anmAshaDataSet, S\n             }\n         }\n         LOGGER.info(\"{} state, Total: {} Ashas imported, {} Ashas rejected\", stateName, saved, rejected);\n-        return new MctsImportAudit(referenceDate, MctsUserType.ASHA, stateCode, stateName, saved, rejected, null);\n+        return new MctsImportAudit(startReferenceDate, endReferenceDate, MctsUserType.ASHA, stateCode, stateName, saved, rejected, null);\n+    }\n+\n+    private void deleteMctsImportFailRecords(final LocalDate startReferenceDate, final LocalDate endReferenceDate, final MctsUserType mctsUserType, final Long stateId) {\n+\n+        @SuppressWarnings(\"unchecked\")\n+        SqlQueryExecution<Long> queryExecution = new SqlQueryExecution<Long>() {\n+\n+            @Override\n+            public String getSqlQuery() {\n+                String query = \"DELETE FROM nms_mcts_failures WHERE importDate between :startReferenceDate AND :endReferenceDate AND stateCode = :stateId AND userType = :mctsUserType\";","path":"mcts/src/main/java/org/motechproject/nms/mcts/service/impl/MctsWsImportServiceImpl.java","position":309,"original_position":309,"commit_id":"3af7a388ca491ae74f88db3171ae86a158cf8c9f","original_commit_id":"3af7a388ca491ae74f88db3171ae86a158cf8c9f","user":{"login":"sripooja","id":9675913,"avatar_url":"https://avatars.githubusercontent.com/u/9675913?v=3","gravatar_id":"","url":"https://api.github.com/users/sripooja","html_url":"https://github.com/sripooja","followers_url":"https://api.github.com/users/sripooja/followers","following_url":"https://api.github.com/users/sripooja/following{/other_user}","gists_url":"https://api.github.com/users/sripooja/gists{/gist_id}","starred_url":"https://api.github.com/users/sripooja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sripooja/subscriptions","organizations_url":"https://api.github.com/users/sripooja/orgs","repos_url":"https://api.github.com/users/sripooja/repos","events_url":"https://api.github.com/users/sripooja/events{/privacy}","received_events_url":"https://api.github.com/users/sripooja/received_events","type":"User","site_admin":false},"body":"Sure. I will make the change","created_at":"2016-07-28T20:54:48Z","updated_at":"2016-07-28T20:54:48Z","html_url":"https://github.com/motech-implementations/nms/pull/693#discussion_r72700971","pull_request_url":"https://api.github.com/repos/motech-implementations/nms/pulls/693","_links":{"self":{"href":"https://api.github.com/repos/motech-implementations/nms/pulls/comments/72700971"},"html":{"href":"https://github.com/motech-implementations/nms/pull/693#discussion_r72700971"},"pull_request":{"href":"https://api.github.com/repos/motech-implementations/nms/pulls/693"}}},"pull_request":{"url":"https://api.github.com/repos/motech-implementations/nms/pulls/693","id":79082119,"html_url":"https://github.com/motech-implementations/nms/pull/693","diff_url":"https://github.com/motech-implementations/nms/pull/693.diff","patch_url":"https://github.com/motech-implementations/nms/pull/693.patch","issue_url":"https://api.github.com/repos/motech-implementations/nms/issues/693","number":693,"state":"open","locked":false,"title":"Mcts import retrial in the last 7 days","user":{"login":"sripooja","id":9675913,"avatar_url":"https://avatars.githubusercontent.com/u/9675913?v=3","gravatar_id":"","url":"https://api.github.com/users/sripooja","html_url":"https://github.com/sripooja","followers_url":"https://api.github.com/users/sripooja/followers","following_url":"https://api.github.com/users/sripooja/following{/other_user}","gists_url":"https://api.github.com/users/sripooja/gists{/gist_id}","starred_url":"https://api.github.com/users/sripooja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sripooja/subscriptions","organizations_url":"https://api.github.com/users/sripooja/orgs","repos_url":"https://api.github.com/users/sripooja/repos","events_url":"https://api.github.com/users/sripooja/events{/privacy}","received_events_url":"https://api.github.com/users/sripooja/received_events","type":"User","site_admin":false},"body":"NMS-360\r\nIntroduce retrial of data import from MCTS service for 7 days","created_at":"2016-07-27T19:22:36Z","updated_at":"2016-07-28T20:54:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"837f7db85a9a3450dbb2a9606aaf0c7c07e0e548","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/motech-implementations/nms/pulls/693/commits","review_comments_url":"https://api.github.com/repos/motech-implementations/nms/pulls/693/comments","review_comment_url":"https://api.github.com/repos/motech-implementations/nms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/motech-implementations/nms/issues/693/comments","statuses_url":"https://api.github.com/repos/motech-implementations/nms/statuses/3af7a388ca491ae74f88db3171ae86a158cf8c9f","head":{"label":"motech-implementations:mcts_retrial","ref":"mcts_retrial","sha":"3af7a388ca491ae74f88db3171ae86a158cf8c9f","user":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"repo":{"id":33508795,"name":"nms","full_name":"motech-implementations/nms","owner":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/motech-implementations/nms","description":"National Motech System for health in India","fork":false,"url":"https://api.github.com/repos/motech-implementations/nms","forks_url":"https://api.github.com/repos/motech-implementations/nms/forks","keys_url":"https://api.github.com/repos/motech-implementations/nms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/motech-implementations/nms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/motech-implementations/nms/teams","hooks_url":"https://api.github.com/repos/motech-implementations/nms/hooks","issue_events_url":"https://api.github.com/repos/motech-implementations/nms/issues/events{/number}","events_url":"https://api.github.com/repos/motech-implementations/nms/events","assignees_url":"https://api.github.com/repos/motech-implementations/nms/assignees{/user}","branches_url":"https://api.github.com/repos/motech-implementations/nms/branches{/branch}","tags_url":"https://api.github.com/repos/motech-implementations/nms/tags","blobs_url":"https://api.github.com/repos/motech-implementations/nms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/motech-implementations/nms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/motech-implementations/nms/git/refs{/sha}","trees_url":"https://api.github.com/repos/motech-implementations/nms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/motech-implementations/nms/statuses/{sha}","languages_url":"https://api.github.com/repos/motech-implementations/nms/languages","stargazers_url":"https://api.github.com/repos/motech-implementations/nms/stargazers","contributors_url":"https://api.github.com/repos/motech-implementations/nms/contributors","subscribers_url":"https://api.github.com/repos/motech-implementations/nms/subscribers","subscription_url":"https://api.github.com/repos/motech-implementations/nms/subscription","commits_url":"https://api.github.com/repos/motech-implementations/nms/commits{/sha}","git_commits_url":"https://api.github.com/repos/motech-implementations/nms/git/commits{/sha}","comments_url":"https://api.github.com/repos/motech-implementations/nms/comments{/number}","issue_comment_url":"https://api.github.com/repos/motech-implementations/nms/issues/comments{/number}","contents_url":"https://api.github.com/repos/motech-implementations/nms/contents/{+path}","compare_url":"https://api.github.com/repos/motech-implementations/nms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/motech-implementations/nms/merges","archive_url":"https://api.github.com/repos/motech-implementations/nms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/motech-implementations/nms/downloads","issues_url":"https://api.github.com/repos/motech-implementations/nms/issues{/number}","pulls_url":"https://api.github.com/repos/motech-implementations/nms/pulls{/number}","milestones_url":"https://api.github.com/repos/motech-implementations/nms/milestones{/number}","notifications_url":"https://api.github.com/repos/motech-implementations/nms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/motech-implementations/nms/labels{/name}","releases_url":"https://api.github.com/repos/motech-implementations/nms/releases{/id}","deployments_url":"https://api.github.com/repos/motech-implementations/nms/deployments","created_at":"2015-04-06T22:18:18Z","updated_at":"2016-05-23T21:39:04Z","pushed_at":"2016-07-28T11:34:58Z","git_url":"git://github.com/motech-implementations/nms.git","ssh_url":"git@github.com:motech-implementations/nms.git","clone_url":"https://github.com/motech-implementations/nms.git","svn_url":"https://github.com/motech-implementations/nms","homepage":"","size":52471,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":22,"forks":8,"open_issues":22,"watchers":1,"default_branch":"master"}},"base":{"label":"motech-implementations:master","ref":"master","sha":"315783bebdeec610f7a27c2e7aa359355e1e651d","user":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"repo":{"id":33508795,"name":"nms","full_name":"motech-implementations/nms","owner":{"login":"motech-implementations","id":6608253,"avatar_url":"https://avatars.githubusercontent.com/u/6608253?v=3","gravatar_id":"","url":"https://api.github.com/users/motech-implementations","html_url":"https://github.com/motech-implementations","followers_url":"https://api.github.com/users/motech-implementations/followers","following_url":"https://api.github.com/users/motech-implementations/following{/other_user}","gists_url":"https://api.github.com/users/motech-implementations/gists{/gist_id}","starred_url":"https://api.github.com/users/motech-implementations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motech-implementations/subscriptions","organizations_url":"https://api.github.com/users/motech-implementations/orgs","repos_url":"https://api.github.com/users/motech-implementations/repos","events_url":"https://api.github.com/users/motech-implementations/events{/privacy}","received_events_url":"https://api.github.com/users/motech-implementations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/motech-implementations/nms","description":"National Motech System for health in India","fork":false,"url":"https://api.github.com/repos/motech-implementations/nms","forks_url":"https://api.github.com/repos/motech-implementations/nms/forks","keys_url":"https://api.github.com/repos/motech-implementations/nms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/motech-implementations/nms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/motech-implementations/nms/teams","hooks_url":"https://api.github.com/repos/motech-implementations/nms/hooks","issue_events_url":"https://api.github.com/repos/motech-implementations/nms/issues/events{/number}","events_url":"https://api.github.com/repos/motech-implementations/nms/events","assignees_url":"https://api.github.com/repos/motech-implementations/nms/assignees{/user}","branches_url":"https://api.github.com/repos/motech-implementations/nms/branches{/branch}","tags_url":"https://api.github.com/repos/motech-implementations/nms/tags","blobs_url":"https://api.github.com/repos/motech-implementations/nms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/motech-implementations/nms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/motech-implementations/nms/git/refs{/sha}","trees_url":"https://api.github.com/repos/motech-implementations/nms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/motech-implementations/nms/statuses/{sha}","languages_url":"https://api.github.com/repos/motech-implementations/nms/languages","stargazers_url":"https://api.github.com/repos/motech-implementations/nms/stargazers","contributors_url":"https://api.github.com/repos/motech-implementations/nms/contributors","subscribers_url":"https://api.github.com/repos/motech-implementations/nms/subscribers","subscription_url":"https://api.github.com/repos/motech-implementations/nms/subscription","commits_url":"https://api.github.com/repos/motech-implementations/nms/commits{/sha}","git_commits_url":"https://api.github.com/repos/motech-implementations/nms/git/commits{/sha}","comments_url":"https://api.github.com/repos/motech-implementations/nms/comments{/number}","issue_comment_url":"https://api.github.com/repos/motech-implementations/nms/issues/comments{/number}","contents_url":"https://api.github.com/repos/motech-implementations/nms/contents/{+path}","compare_url":"https://api.github.com/repos/motech-implementations/nms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/motech-implementations/nms/merges","archive_url":"https://api.github.com/repos/motech-implementations/nms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/motech-implementations/nms/downloads","issues_url":"https://api.github.com/repos/motech-implementations/nms/issues{/number}","pulls_url":"https://api.github.com/repos/motech-implementations/nms/pulls{/number}","milestones_url":"https://api.github.com/repos/motech-implementations/nms/milestones{/number}","notifications_url":"https://api.github.com/repos/motech-implementations/nms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/motech-implementations/nms/labels{/name}","releases_url":"https://api.github.com/repos/motech-implementations/nms/releases{/id}","deployments_url":"https://api.github.com/repos/motech-implementations/nms/deployments","created_at":"2015-04-06T22:18:18Z","updated_at":"2016-05-23T21:39:04Z","pushed_at":"2016-07-28T11:34:58Z","git_url":"git://github.com/motech-implementations/nms.git","ssh_url":"git@github.com:motech-implementations/nms.git","clone_url":"https://github.com/motech-implementations/nms.git","svn_url":"https://github.com/motech-implementations/nms","homepage":"","size":52471,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":22,"forks":8,"open_issues":22,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/motech-implementations/nms/pulls/693"},"html":{"href":"https://github.com/motech-implementations/nms/pull/693"},"issue":{"href":"https://api.github.com/repos/motech-implementations/nms/issues/693"},"comments":{"href":"https://api.github.com/repos/motech-implementations/nms/issues/693/comments"},"review_comments":{"href":"https://api.github.com/repos/motech-implementations/nms/pulls/693/comments"},"review_comment":{"href":"https://api.github.com/repos/motech-implementations/nms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/motech-implementations/nms/pulls/693/commits"},"statuses":{"href":"https://api.github.com/repos/motech-implementations/nms/statuses/3af7a388ca491ae74f88db3171ae86a158cf8c9f"}}}}
{"actor":{"display_login":"sripooja"}}