{"action":"created","comment":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/31884575","id":31884575,"diff_hunk":"@@ -108,6 +113,320 @@ public void testExecuteAndPostProcess() throws Exception {\n         \n         assertEquals(expectedLogMessage, a.getLogMessage());\n         \n+        ______TS(\"Typical case, edit comment successful from comments page\");\n+        \n+        comments = backDoorLogic.getCommentsForReceiver(\n+                                         instructor.courseId, CommentParticipantType.PERSON, student.email);\n+        iterator = comments.iterator();\n+        while (iterator.hasNext()) {\n+            CommentAttributes commentAttributes = iterator.next();\n+            if (!commentAttributes.giverEmail.equals(instructor.email)) {\n+                iterator.remove();\n+            }\n+        }\n+        Assumption.assertEquals(1, comments.size());\n+\n+        submissionParams = new String[] {\n+                Const.ParamsNames.COMMENT_ID, comments.get(0).getCommentId().toString(),\n+                Const.ParamsNames.COMMENT_EDITTYPE, \"edit\",\n+                Const.ParamsNames.COMMENT_TEXT, \"Another edited comment text\",\n+                Const.ParamsNames.COURSE_ID, instructor.courseId,\n+                Const.ParamsNames.STUDENT_EMAIL, student.email,\n+                Const.ParamsNames.FROM_COMMENTS_PAGE, \"true\"\n+        };\n+\n+        a = getAction(submissionParams);\n+        r = getRedirectResult(a);\n+\n+        assertEquals(Const.ActionURIs.INSTRUCTOR_COMMENTS_PAGE\n+                + \"?user=idOfInstructor3&\"                        \n+                + \"courseid=idOfTypicalCourse1&\"                \n+                + \"error=false\",\n+                r.getDestinationWithParams());\n+        assertEquals(false, r.isError);\n+        assertEquals(\"Comment edited\", r.getStatusMessage());\n+\n+        expectedLogMessage = \"TEAMMATESLOG|||instructorStudentCommentEdit|||instructorStudentCommentEdit\"+\n+                \"|||true|||Instructor|||Instructor 3 of Course 1 and 2|||idOfInstructor3\"+\n+                \"|||instr3@course1n2.tmt|||\" +\n+                \"Edited Comment for Student:<span class=\\\"bold\\\">(null)</span> \" +\n+                \"for Course <span class=\\\"bold\\\">[\" + instructor.courseId + \"]</span><br>\" +\n+                \"<span class=\\\"bold\\\">Comment:</span> \"  + \"<Text: Another edited comment text>\" +\n+                \"|||/page/instructorStudentCommentEdit\";\n+        \n+        assertEquals(expectedLogMessage, a.getLogMessage());\n+        \n+        ______TS(\"Typical case, edit comment successful recipient type not null\");\n+        \n+        comments = backDoorLogic.getCommentsForReceiver(\n+                                         instructor.courseId, CommentParticipantType.PERSON, student.email);\n+        iterator = comments.iterator();\n+        while (iterator.hasNext()) {\n+            CommentAttributes commentAttributes = iterator.next();\n+            if (!commentAttributes.giverEmail.equals(instructor.email)) {\n+                iterator.remove();\n+            }\n+        }\n+        Assumption.assertEquals(1, comments.size());\n+\n+        submissionParams = new String[] {\n+                Const.ParamsNames.COMMENT_ID, comments.get(0).getCommentId().toString(),\n+                Const.ParamsNames.COMMENT_EDITTYPE, \"edit\",\n+                Const.ParamsNames.COMMENT_TEXT, \"some text\",\n+                Const.ParamsNames.COURSE_ID, instructor.courseId,\n+                Const.ParamsNames.STUDENT_EMAIL, student.email,\n+                Const.ParamsNames.RECIPIENT_TYPE, \"PERSON\"\n+        };\n+\n+        a = getAction(submissionParams);\n+        r = getRedirectResult(a);\n+\n+        assertEquals(Const.ActionURIs.INSTRUCTOR_STUDENT_RECORDS_PAGE\n+                + \"?courseid=idOfTypicalCourse1&\"\n+                + \"studentemail=student2InCourse1%40gmail.tmt&\"\n+                + \"user=idOfInstructor3&\"\n+                + \"error=false\",\n+                r.getDestinationWithParams());\n+        assertEquals(false, r.isError);\n+        assertEquals(\"Comment edited\", r.getStatusMessage());\n+\n+        expectedLogMessage = \"TEAMMATESLOG|||instructorStudentCommentEdit|||instructorStudentCommentEdit\"+\n+                \"|||true|||Instructor|||Instructor 3 of Course 1 and 2|||idOfInstructor3\"+\n+                \"|||instr3@course1n2.tmt|||\" +\n+                \"Edited Comment for Student:<span class=\\\"bold\\\">(null)</span> \" +\n+                \"for Course <span class=\\\"bold\\\">[\" + instructor.courseId + \"]</span><br>\" +","path":"src/test/java/teammates/test/cases/ui/InstructorStudentCommentEditActionTest.java","position":140,"original_position":140,"commit_id":"fba82b6bfadde45f525b7f3a070c8915d0f7d4fb","original_commit_id":"fba82b6bfadde45f525b7f3a070c8915d0f7d4fb","user":{"login":"kanghj","id":2216119,"avatar_url":"https://avatars.githubusercontent.com/u/2216119?v=3","gravatar_id":"","url":"https://api.github.com/users/kanghj","html_url":"https://github.com/kanghj","followers_url":"https://api.github.com/users/kanghj/followers","following_url":"https://api.github.com/users/kanghj/following{/other_user}","gists_url":"https://api.github.com/users/kanghj/gists{/gist_id}","starred_url":"https://api.github.com/users/kanghj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanghj/subscriptions","organizations_url":"https://api.github.com/users/kanghj/orgs","repos_url":"https://api.github.com/users/kanghj/repos","events_url":"https://api.github.com/users/kanghj/events{/privacy}","received_events_url":"https://api.github.com/users/kanghj/received_events","type":"User","site_admin":false},"body":"Oh wait, it just means that the recipient for that comment doesn't get edited. ","created_at":"2015-06-08T02:25:53Z","updated_at":"2015-06-08T02:25:53Z","html_url":"https://github.com/TEAMMATES/repo/pull/3647#discussion_r31884575","pull_request_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/3647","_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments/31884575"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/3647#discussion_r31884575"},"pull_request":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/3647"}}},"pull_request":{"url":"https://api.github.com/repos/TEAMMATES/repo/pulls/3647","id":37107556,"html_url":"https://github.com/TEAMMATES/repo/pull/3647","diff_url":"https://github.com/TEAMMATES/repo/pull/3647.diff","patch_url":"https://github.com/TEAMMATES/repo/pull/3647.patch","issue_url":"https://api.github.com/repos/TEAMMATES/repo/issues/3647","number":3647,"state":"open","locked":false,"title":"Refine InstructorStudentCommentEditAction and its test","user":{"login":"JosephineKwa","id":9999077,"avatar_url":"https://avatars.githubusercontent.com/u/9999077?v=3","gravatar_id":"","url":"https://api.github.com/users/JosephineKwa","html_url":"https://github.com/JosephineKwa","followers_url":"https://api.github.com/users/JosephineKwa/followers","following_url":"https://api.github.com/users/JosephineKwa/following{/other_user}","gists_url":"https://api.github.com/users/JosephineKwa/gists{/gist_id}","starred_url":"https://api.github.com/users/JosephineKwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JosephineKwa/subscriptions","organizations_url":"https://api.github.com/users/JosephineKwa/orgs","repos_url":"https://api.github.com/users/JosephineKwa/repos","events_url":"https://api.github.com/users/JosephineKwa/events{/privacy}","received_events_url":"https://api.github.com/users/JosephineKwa/received_events","type":"User","site_admin":false},"body":"Formatted style and added additional tests to improve test coverage","created_at":"2015-06-07T14:35:44Z","updated_at":"2015-06-08T02:25:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4e44bac145ba686849d0a10247ffa98ca47d5c6","assignee":{"login":"kanghj","id":2216119,"avatar_url":"https://avatars.githubusercontent.com/u/2216119?v=3","gravatar_id":"","url":"https://api.github.com/users/kanghj","html_url":"https://github.com/kanghj","followers_url":"https://api.github.com/users/kanghj/followers","following_url":"https://api.github.com/users/kanghj/following{/other_user}","gists_url":"https://api.github.com/users/kanghj/gists{/gist_id}","starred_url":"https://api.github.com/users/kanghj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanghj/subscriptions","organizations_url":"https://api.github.com/users/kanghj/orgs","repos_url":"https://api.github.com/users/kanghj/repos","events_url":"https://api.github.com/users/kanghj/events{/privacy}","received_events_url":"https://api.github.com/users/kanghj/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/3647/commits","review_comments_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/3647/comments","review_comment_url":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/issues/3647/comments","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/fba82b6bfadde45f525b7f3a070c8915d0f7d4fb","head":{"label":"TEAMMATES:InstructorStudentCommentEditActionRefinements","ref":"InstructorStudentCommentEditActionRefinements","sha":"fba82b6bfadde45f525b7f3a070c8915d0f7d4fb","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments{/number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2015-05-21T18:54:02Z","pushed_at":"2015-06-07T20:30:20Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"http://teammatesv4.appspot.com/","size":151331,"stargazers_count":43,"watchers_count":43,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"open_issues_count":382,"forks":125,"open_issues":382,"watchers":43,"default_branch":"master"}},"base":{"label":"TEAMMATES:master","ref":"master","sha":"8490f94969f482593fb0f8b6709ae4f3663141aa","user":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"repo":{"id":19369035,"name":"repo","full_name":"TEAMMATES/repo","owner":{"login":"TEAMMATES","id":7374810,"avatar_url":"https://avatars.githubusercontent.com/u/7374810?v=3","gravatar_id":"","url":"https://api.github.com/users/TEAMMATES","html_url":"https://github.com/TEAMMATES","followers_url":"https://api.github.com/users/TEAMMATES/followers","following_url":"https://api.github.com/users/TEAMMATES/following{/other_user}","gists_url":"https://api.github.com/users/TEAMMATES/gists{/gist_id}","starred_url":"https://api.github.com/users/TEAMMATES/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TEAMMATES/subscriptions","organizations_url":"https://api.github.com/users/TEAMMATES/orgs","repos_url":"https://api.github.com/users/TEAMMATES/repos","events_url":"https://api.github.com/users/TEAMMATES/events{/privacy}","received_events_url":"https://api.github.com/users/TEAMMATES/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TEAMMATES/repo","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":false,"url":"https://api.github.com/repos/TEAMMATES/repo","forks_url":"https://api.github.com/repos/TEAMMATES/repo/forks","keys_url":"https://api.github.com/repos/TEAMMATES/repo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/repo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/repo/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/repo/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/repo/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/repo/events","assignees_url":"https://api.github.com/repos/TEAMMATES/repo/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/repo/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/repo/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/repo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/repo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/repo/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/repo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/repo/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/repo/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/repo/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/repo/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/repo/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/repo/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/repo/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/repo/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/repo/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/repo/issues/comments{/number}","contents_url":"https://api.github.com/repos/TEAMMATES/repo/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/repo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/repo/merges","archive_url":"https://api.github.com/repos/TEAMMATES/repo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/repo/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/repo/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/repo/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/repo/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/repo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/repo/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/repo/releases{/id}","created_at":"2014-05-02T07:43:00Z","updated_at":"2015-05-21T18:54:02Z","pushed_at":"2015-06-07T20:30:20Z","git_url":"git://github.com/TEAMMATES/repo.git","ssh_url":"git@github.com:TEAMMATES/repo.git","clone_url":"https://github.com/TEAMMATES/repo.git","svn_url":"https://github.com/TEAMMATES/repo","homepage":"http://teammatesv4.appspot.com/","size":151331,"stargazers_count":43,"watchers_count":43,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"open_issues_count":382,"forks":125,"open_issues":382,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/3647"},"html":{"href":"https://github.com/TEAMMATES/repo/pull/3647"},"issue":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/3647"},"comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/issues/3647/comments"},"review_comments":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/3647/comments"},"review_comment":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TEAMMATES/repo/pulls/3647/commits"},"statuses":{"href":"https://api.github.com/repos/TEAMMATES/repo/statuses/fba82b6bfadde45f525b7f3a070c8915d0f7d4fb"}}}}