{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/formplayer/pulls/comments/71888057","id":71888057,"diff_hunk":"@@ -76,36 +76,36 @@ public NewFormSessionResponse openIncompleteForm(@RequestBody IncompleteSessionR\n \n     @ApiOperation(value = \"Answer the question at the given index\")\n     @RequestMapping(value = Constants.URL_ANSWER_QUESTION, method = RequestMethod.POST)\n-    public AnswerQuestionResponseBean answerQuestion(@RequestBody AnswerQuestionRequestBean answerQuestionBean) throws Exception {\n+    public FormEntryResponseBean answerQuestion(@RequestBody AnswerQuestionRequestBean answerQuestionBean) throws Exception {\n         log.info(\"Answer question with bean: \" + answerQuestionBean);\n         SerializableFormSession session = sessionRepo.findOne(answerQuestionBean.getSessionId());\n-        log.info(\"Restored serialized session: \" + session);\n         FormSession formEntrySession = new FormSession(session);\n-\n         JSONObject resp = JsonActionUtils.questionAnswerToJson(formEntrySession.getFormEntryController(),\n                 formEntrySession.getFormEntryModel(),\n                 answerQuestionBean.getAnswer() != null? answerQuestionBean.getAnswer().toString() : null,\n                 answerQuestionBean.getFormIndex());\n-\n+        formEntrySession.setSequenceId(formEntrySession.getSequenceId() + 1);\n         updateSession(formEntrySession, session);\n \n-        AnswerQuestionResponseBean responseBean = mapper.readValue(resp.toString(), AnswerQuestionResponseBean.class);\n-        responseBean.setSequenceId(formEntrySession.getSequenceId() + 1);\n+        FormEntryResponseBean responseBean = mapper.readValue(resp.toString(), FormEntryResponseBean.class);\n+        responseBean.setSequenceId(formEntrySession.getSequenceId());","path":"src/main/java/application/FormController.java","position":22,"original_position":22,"commit_id":"56cdef2acd5dfb9f5d91778da5257426955170ef","original_commit_id":"56cdef2acd5dfb9f5d91778da5257426955170ef","user":{"login":"wpride","id":2293064,"avatar_url":"https://avatars.githubusercontent.com/u/2293064?v=3","gravatar_id":"","url":"https://api.github.com/users/wpride","html_url":"https://github.com/wpride","followers_url":"https://api.github.com/users/wpride/followers","following_url":"https://api.github.com/users/wpride/following{/other_user}","gists_url":"https://api.github.com/users/wpride/gists{/gist_id}","starred_url":"https://api.github.com/users/wpride/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpride/subscriptions","organizations_url":"https://api.github.com/users/wpride/orgs","repos_url":"https://api.github.com/users/wpride/repos","events_url":"https://api.github.com/users/wpride/events{/privacy}","received_events_url":"https://api.github.com/users/wpride/received_events","type":"User","site_admin":false},"body":"setting it in the session object above (line 87) instead","created_at":"2016-07-22T14:32:26Z","updated_at":"2016-07-22T14:32:26Z","html_url":"https://github.com/dimagi/formplayer/pull/63#discussion_r71888057","pull_request_url":"https://api.github.com/repos/dimagi/formplayer/pulls/63","_links":{"self":{"href":"https://api.github.com/repos/dimagi/formplayer/pulls/comments/71888057"},"html":{"href":"https://github.com/dimagi/formplayer/pull/63#discussion_r71888057"},"pull_request":{"href":"https://api.github.com/repos/dimagi/formplayer/pulls/63"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/formplayer/pulls/63","id":78383273,"html_url":"https://github.com/dimagi/formplayer/pull/63","diff_url":"https://github.com/dimagi/formplayer/pull/63.diff","patch_url":"https://github.com/dimagi/formplayer/pull/63.patch","issue_url":"https://api.github.com/repos/dimagi/formplayer/issues/63","number":63,"state":"open","locked":false,"title":"Wsp/sequence","user":{"login":"wpride","id":2293064,"avatar_url":"https://avatars.githubusercontent.com/u/2293064?v=3","gravatar_id":"","url":"https://api.github.com/users/wpride","html_url":"https://github.com/wpride","followers_url":"https://api.github.com/users/wpride/followers","following_url":"https://api.github.com/users/wpride/following{/other_user}","gists_url":"https://api.github.com/users/wpride/gists{/gist_id}","starred_url":"https://api.github.com/users/wpride/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wpride/subscriptions","organizations_url":"https://api.github.com/users/wpride/orgs","repos_url":"https://api.github.com/users/wpride/repos","events_url":"https://api.github.com/users/wpride/events{/privacy}","received_events_url":"https://api.github.com/users/wpride/received_events","type":"User","site_admin":false},"body":"Add sequenceId checking and incrementing to Formplayer","created_at":"2016-07-21T20:38:42Z","updated_at":"2016-07-22T14:32:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b1a4caf9f3df81ff8c287dbe749a70496cd3fad","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/formplayer/pulls/63/commits","review_comments_url":"https://api.github.com/repos/dimagi/formplayer/pulls/63/comments","review_comment_url":"https://api.github.com/repos/dimagi/formplayer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/formplayer/issues/63/comments","statuses_url":"https://api.github.com/repos/dimagi/formplayer/statuses/56cdef2acd5dfb9f5d91778da5257426955170ef","head":{"label":"dimagi:wsp/sequence-id","ref":"wsp/sequence-id","sha":"56cdef2acd5dfb9f5d91778da5257426955170ef","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":49518941,"name":"formplayer","full_name":"dimagi/formplayer","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/formplayer","description":"","fork":false,"url":"https://api.github.com/repos/dimagi/formplayer","forks_url":"https://api.github.com/repos/dimagi/formplayer/forks","keys_url":"https://api.github.com/repos/dimagi/formplayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/formplayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/formplayer/teams","hooks_url":"https://api.github.com/repos/dimagi/formplayer/hooks","issue_events_url":"https://api.github.com/repos/dimagi/formplayer/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/formplayer/events","assignees_url":"https://api.github.com/repos/dimagi/formplayer/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/formplayer/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/formplayer/tags","blobs_url":"https://api.github.com/repos/dimagi/formplayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/formplayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/formplayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/formplayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/formplayer/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/formplayer/languages","stargazers_url":"https://api.github.com/repos/dimagi/formplayer/stargazers","contributors_url":"https://api.github.com/repos/dimagi/formplayer/contributors","subscribers_url":"https://api.github.com/repos/dimagi/formplayer/subscribers","subscription_url":"https://api.github.com/repos/dimagi/formplayer/subscription","commits_url":"https://api.github.com/repos/dimagi/formplayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/formplayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/formplayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/formplayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/formplayer/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/formplayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/formplayer/merges","archive_url":"https://api.github.com/repos/dimagi/formplayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/formplayer/downloads","issues_url":"https://api.github.com/repos/dimagi/formplayer/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/formplayer/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/formplayer/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/formplayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/formplayer/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/formplayer/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/formplayer/deployments","created_at":"2016-01-12T18:04:32Z","updated_at":"2016-01-20T18:37:50Z","pushed_at":"2016-07-21T20:48:42Z","git_url":"git://github.com/dimagi/formplayer.git","ssh_url":"git@github.com:dimagi/formplayer.git","clone_url":"https://github.com/dimagi/formplayer.git","svn_url":"https://github.com/dimagi/formplayer","homepage":null,"size":76367,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"0cf65fa96e5837dbe2a919fabd05c655dee0dc95","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":49518941,"name":"formplayer","full_name":"dimagi/formplayer","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/formplayer","description":"","fork":false,"url":"https://api.github.com/repos/dimagi/formplayer","forks_url":"https://api.github.com/repos/dimagi/formplayer/forks","keys_url":"https://api.github.com/repos/dimagi/formplayer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/formplayer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/formplayer/teams","hooks_url":"https://api.github.com/repos/dimagi/formplayer/hooks","issue_events_url":"https://api.github.com/repos/dimagi/formplayer/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/formplayer/events","assignees_url":"https://api.github.com/repos/dimagi/formplayer/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/formplayer/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/formplayer/tags","blobs_url":"https://api.github.com/repos/dimagi/formplayer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/formplayer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/formplayer/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/formplayer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/formplayer/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/formplayer/languages","stargazers_url":"https://api.github.com/repos/dimagi/formplayer/stargazers","contributors_url":"https://api.github.com/repos/dimagi/formplayer/contributors","subscribers_url":"https://api.github.com/repos/dimagi/formplayer/subscribers","subscription_url":"https://api.github.com/repos/dimagi/formplayer/subscription","commits_url":"https://api.github.com/repos/dimagi/formplayer/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/formplayer/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/formplayer/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/formplayer/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/formplayer/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/formplayer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/formplayer/merges","archive_url":"https://api.github.com/repos/dimagi/formplayer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/formplayer/downloads","issues_url":"https://api.github.com/repos/dimagi/formplayer/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/formplayer/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/formplayer/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/formplayer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/formplayer/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/formplayer/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/formplayer/deployments","created_at":"2016-01-12T18:04:32Z","updated_at":"2016-01-20T18:37:50Z","pushed_at":"2016-07-21T20:48:42Z","git_url":"git://github.com/dimagi/formplayer.git","ssh_url":"git@github.com:dimagi/formplayer.git","clone_url":"https://github.com/dimagi/formplayer.git","svn_url":"https://github.com/dimagi/formplayer","homepage":null,"size":76367,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/formplayer/pulls/63"},"html":{"href":"https://github.com/dimagi/formplayer/pull/63"},"issue":{"href":"https://api.github.com/repos/dimagi/formplayer/issues/63"},"comments":{"href":"https://api.github.com/repos/dimagi/formplayer/issues/63/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/formplayer/pulls/63/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/formplayer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/formplayer/pulls/63/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/formplayer/statuses/56cdef2acd5dfb9f5d91778da5257426955170ef"}}}}
{"actor":{"display_login":"wpride"}}