{"action":"created","comment":{"url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments/79643963","id":79643963,"diff_hunk":"@@ -1064,13 +1066,21 @@ public void testCreateCourseAndInstructor() throws Exception {\n         \n         CourseAttributes invalidCourse = new CourseAttributes(\"invalid id\", \"Fresh course for tccai\", \"InvalidTimeZone\");\n         \n+        String expectedError =\n+                getPopulatedErrorMessage(\n+                    FieldValidator.COURSE_ID_ERROR_MESSAGE, invalidCourse.getId(),\n+                    FieldValidator.COURSE_ID_FIELD_NAME, FieldValidator.REASON_INCORRECT_FORMAT,\n+                    FieldValidator.COURSE_ID_MAX_LENGTH) + EOL\n+                + getPopulatedErrorMessage(\n+                      FieldValidator.COURSE_TIME_ZONE_ERROR_MESSAGE, invalidCourse.getTimeZone(),\n+                      FieldValidator.COURSE_TIME_ZONE_FIELD_NAME, FieldValidator.REASON_UNAVAILABLE_AS_CHOICE);","path":"src/test/java/teammates/test/cases/logic/CoursesLogicTest.java","position":55,"original_position":55,"commit_id":"4df397bb25b012ebbb9a2ac4406ef86212c78b40","original_commit_id":"4df397bb25b012ebbb9a2ac4406ef86212c78b40","user":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"body":"Id rather have the full string here, instead of using constants. That way, we can see how the error message will look to the user.","created_at":"2016-09-20T15:47:38Z","updated_at":"2016-09-20T15:47:38Z","html_url":"https://github.com/TEAMMATES/teammates/pull/6058#discussion_r79643963","pull_request_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6058","_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments/79643963"},"html":{"href":"https://github.com/TEAMMATES/teammates/pull/6058#discussion_r79643963"},"pull_request":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6058"}}},"pull_request":{"url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6058","id":84981084,"html_url":"https://github.com/TEAMMATES/teammates/pull/6058","diff_url":"https://github.com/TEAMMATES/teammates/pull/6058.diff","patch_url":"https://github.com/TEAMMATES/teammates/pull/6058.patch","issue_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/6058","number":6058,"state":"open","locked":false,"title":"Replace more magic strings with constants already defined in FieldValidator #5305","user":{"login":"pratyoushs","id":15091305,"avatar_url":"https://avatars.githubusercontent.com/u/15091305?v=3","gravatar_id":"","url":"https://api.github.com/users/pratyoushs","html_url":"https://github.com/pratyoushs","followers_url":"https://api.github.com/users/pratyoushs/followers","following_url":"https://api.github.com/users/pratyoushs/following{/other_user}","gists_url":"https://api.github.com/users/pratyoushs/gists{/gist_id}","starred_url":"https://api.github.com/users/pratyoushs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratyoushs/subscriptions","organizations_url":"https://api.github.com/users/pratyoushs/orgs","repos_url":"https://api.github.com/users/pratyoushs/repos","events_url":"https://api.github.com/users/pratyoushs/events{/privacy}","received_events_url":"https://api.github.com/users/pratyoushs/received_events","type":"User","site_admin":false},"body":"Fixes #5305 \r\n\r\n<!--\r\nPlease follow the naming conventions in the \"guidelines for contributing\" link above or the pull request may be rejected.\r\n\r\nAlso, do consider outlining the solution taken as doing so will likely help in the reviewing process\r\n(e.g., when the pull request involves non-trivial changes)\r\n-->\r\n\r\nClasses affected are CoursesLogicTest, FeedbackResponseCommentsLogicTest, InstructorsLogicTest,\r\nAdminInstructorAccountAddActionTest, InstructorFeedbackEditCopyUiTest, InstructorCourseEnrollSaveActionTest,\r\nInstructorFeedbackAddActionTest and InstructorFeedbackCopyActionTest.","created_at":"2016-09-13T03:44:23Z","updated_at":"2016-09-20T15:50:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6921f62fe057d371235964fa9401d5dd43fbc6ad","assignee":{"login":"junhaoyap","id":6291947,"avatar_url":"https://avatars.githubusercontent.com/u/6291947?v=3","gravatar_id":"","url":"https://api.github.com/users/junhaoyap","html_url":"https://github.com/junhaoyap","followers_url":"https://api.github.com/users/junhaoyap/followers","following_url":"https://api.github.com/users/junhaoyap/following{/other_user}","gists_url":"https://api.github.com/users/junhaoyap/gists{/gist_id}","starred_url":"https://api.github.com/users/junhaoyap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junhaoyap/subscriptions","organizations_url":"https://api.github.com/users/junhaoyap/orgs","repos_url":"https://api.github.com/users/junhaoyap/repos","events_url":"https://api.github.com/users/junhaoyap/events{/privacy}","received_events_url":"https://api.github.com/users/junhaoyap/received_events","type":"User","site_admin":false},"assignees":[{"login":"junhaoyap","id":6291947,"avatar_url":"https://avatars.githubusercontent.com/u/6291947?v=3","gravatar_id":"","url":"https://api.github.com/users/junhaoyap","html_url":"https://github.com/junhaoyap","followers_url":"https://api.github.com/users/junhaoyap/followers","following_url":"https://api.github.com/users/junhaoyap/following{/other_user}","gists_url":"https://api.github.com/users/junhaoyap/gists{/gist_id}","starred_url":"https://api.github.com/users/junhaoyap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junhaoyap/subscriptions","organizations_url":"https://api.github.com/users/junhaoyap/orgs","repos_url":"https://api.github.com/users/junhaoyap/repos","events_url":"https://api.github.com/users/junhaoyap/events{/privacy}","received_events_url":"https://api.github.com/users/junhaoyap/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6058/commits","review_comments_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6058/comments","review_comment_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/6058/comments","statuses_url":"https://api.github.com/repos/TEAMMATES/teammates/statuses/4df397bb25b012ebbb9a2ac4406ef86212c78b40","head":{"label":"pratyoushs:5305-replace-magic-strings-with-constants-from-fieldvalidator","ref":"5305-replace-magic-strings-with-constants-from-fieldvalidator","sha":"4df397bb25b012ebbb9a2ac4406ef86212c78b40","user":{"login":"pratyoushs","id":15091305,"avatar_url":"https://avatars.githubusercontent.com/u/15091305?v=3","gravatar_id":"","url":"https://api.github.com/users/pratyoushs","html_url":"https://github.com/pratyoushs","followers_url":"https://api.github.com/users/pratyoushs/followers","following_url":"https://api.github.com/users/pratyoushs/following{/other_user}","gists_url":"https://api.github.com/users/pratyoushs/gists{/gist_id}","starred_url":"https://api.github.com/users/pratyoushs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratyoushs/subscriptions","organizations_url":"https://api.github.com/users/pratyoushs/orgs","repos_url":"https://api.github.com/users/pratyoushs/repos","events_url":"https://api.github.com/users/pratyoushs/events{/privacy}","received_events_url":"https://api.github.com/users/pratyoushs/received_events","type":"User","site_admin":false},"repo":{"id":64557141,"name":"teammates","full_name":"pratyoushs/teammates","owner":{"login":"pratyoushs","id":15091305,"avatar_url":"https://avatars.githubusercontent.com/u/15091305?v=3","gravatar_id":"","url":"https://api.github.com/users/pratyoushs","html_url":"https://github.com/pratyoushs","followers_url":"https://api.github.com/users/pratyoushs/followers","following_url":"https://api.github.com/users/pratyoushs/following{/other_user}","gists_url":"https://api.github.com/users/pratyoushs/gists{/gist_id}","starred_url":"https://api.github.com/users/pratyoushs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pratyoushs/subscriptions","organizations_url":"https://api.github.com/users/pratyoushs/orgs","repos_url":"https://api.github.com/users/pratyoushs/repos","events_url":"https://api.github.com/users/pratyoushs/events{/privacy}","received_events_url":"https://api.github.com/users/pratyoushs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pratyoushs/teammates","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":true,"url":"https://api.github.com/repos/pratyoushs/teammates","forks_url":"https://api.github.com/repos/pratyoushs/teammates/forks","keys_url":"https://api.github.com/repos/pratyoushs/teammates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pratyoushs/teammates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pratyoushs/teammates/teams","hooks_url":"https://api.github.com/repos/pratyoushs/teammates/hooks","issue_events_url":"https://api.github.com/repos/pratyoushs/teammates/issues/events{/number}","events_url":"https://api.github.com/repos/pratyoushs/teammates/events","assignees_url":"https://api.github.com/repos/pratyoushs/teammates/assignees{/user}","branches_url":"https://api.github.com/repos/pratyoushs/teammates/branches{/branch}","tags_url":"https://api.github.com/repos/pratyoushs/teammates/tags","blobs_url":"https://api.github.com/repos/pratyoushs/teammates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pratyoushs/teammates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pratyoushs/teammates/git/refs{/sha}","trees_url":"https://api.github.com/repos/pratyoushs/teammates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pratyoushs/teammates/statuses/{sha}","languages_url":"https://api.github.com/repos/pratyoushs/teammates/languages","stargazers_url":"https://api.github.com/repos/pratyoushs/teammates/stargazers","contributors_url":"https://api.github.com/repos/pratyoushs/teammates/contributors","subscribers_url":"https://api.github.com/repos/pratyoushs/teammates/subscribers","subscription_url":"https://api.github.com/repos/pratyoushs/teammates/subscription","commits_url":"https://api.github.com/repos/pratyoushs/teammates/commits{/sha}","git_commits_url":"https://api.github.com/repos/pratyoushs/teammates/git/commits{/sha}","comments_url":"https://api.github.com/repos/pratyoushs/teammates/comments{/number}","issue_comment_url":"https://api.github.com/repos/pratyoushs/teammates/issues/comments{/number}","contents_url":"https://api.github.com/repos/pratyoushs/teammates/contents/{+path}","compare_url":"https://api.github.com/repos/pratyoushs/teammates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pratyoushs/teammates/merges","archive_url":"https://api.github.com/repos/pratyoushs/teammates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pratyoushs/teammates/downloads","issues_url":"https://api.github.com/repos/pratyoushs/teammates/issues{/number}","pulls_url":"https://api.github.com/repos/pratyoushs/teammates/pulls{/number}","milestones_url":"https://api.github.com/repos/pratyoushs/teammates/milestones{/number}","notifications_url":"https://api.github.com/repos/pratyoushs/teammates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pratyoushs/teammates/labels{/name}","releases_url":"https://api.github.com/repos/pratyoushs/teammates/releases{/id}","deployments_url":"https://api.github.com/repos/pratyoushs/teammates/deployments","created_at":"2016-07-30T17:54:03Z","updated_at":"2016-07-30T17:54:11Z","pushed_at":"2016-09-16T04:10:31Z","git_url":"git://github.com/pratyoushs/teammates.git","ssh_url":"git@github.com:pratyoushs/teammates.git","clone_url":"https://github.com/pratyoushs/teammates.git","svn_url":"https://github.com/pratyoushs/teammates","homepage":"http://teammatesv4.appspot.com/","size":170220,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"TEAMMATES:master","ref":"master","sha":"13375021d328bdc6b97d663be6e4bae400403445","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":"teammates","full_name":"TEAMMATES/teammates","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/teammates","description":"This is the project website for the TEAMMATES feedback management tool for education","fork":false,"url":"https://api.github.com/repos/TEAMMATES/teammates","forks_url":"https://api.github.com/repos/TEAMMATES/teammates/forks","keys_url":"https://api.github.com/repos/TEAMMATES/teammates/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TEAMMATES/teammates/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TEAMMATES/teammates/teams","hooks_url":"https://api.github.com/repos/TEAMMATES/teammates/hooks","issue_events_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/events{/number}","events_url":"https://api.github.com/repos/TEAMMATES/teammates/events","assignees_url":"https://api.github.com/repos/TEAMMATES/teammates/assignees{/user}","branches_url":"https://api.github.com/repos/TEAMMATES/teammates/branches{/branch}","tags_url":"https://api.github.com/repos/TEAMMATES/teammates/tags","blobs_url":"https://api.github.com/repos/TEAMMATES/teammates/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TEAMMATES/teammates/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TEAMMATES/teammates/git/refs{/sha}","trees_url":"https://api.github.com/repos/TEAMMATES/teammates/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TEAMMATES/teammates/statuses/{sha}","languages_url":"https://api.github.com/repos/TEAMMATES/teammates/languages","stargazers_url":"https://api.github.com/repos/TEAMMATES/teammates/stargazers","contributors_url":"https://api.github.com/repos/TEAMMATES/teammates/contributors","subscribers_url":"https://api.github.com/repos/TEAMMATES/teammates/subscribers","subscription_url":"https://api.github.com/repos/TEAMMATES/teammates/subscription","commits_url":"https://api.github.com/repos/TEAMMATES/teammates/commits{/sha}","git_commits_url":"https://api.github.com/repos/TEAMMATES/teammates/git/commits{/sha}","comments_url":"https://api.github.com/repos/TEAMMATES/teammates/comments{/number}","issue_comment_url":"https://api.github.com/repos/TEAMMATES/teammates/issues/comments{/number}","contents_url":"https://api.github.com/repos/TEAMMATES/teammates/contents/{+path}","compare_url":"https://api.github.com/repos/TEAMMATES/teammates/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TEAMMATES/teammates/merges","archive_url":"https://api.github.com/repos/TEAMMATES/teammates/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TEAMMATES/teammates/downloads","issues_url":"https://api.github.com/repos/TEAMMATES/teammates/issues{/number}","pulls_url":"https://api.github.com/repos/TEAMMATES/teammates/pulls{/number}","milestones_url":"https://api.github.com/repos/TEAMMATES/teammates/milestones{/number}","notifications_url":"https://api.github.com/repos/TEAMMATES/teammates/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TEAMMATES/teammates/labels{/name}","releases_url":"https://api.github.com/repos/TEAMMATES/teammates/releases{/id}","deployments_url":"https://api.github.com/repos/TEAMMATES/teammates/deployments","created_at":"2014-05-02T07:43:00Z","updated_at":"2016-09-19T20:17:03Z","pushed_at":"2016-09-18T19:45:49Z","git_url":"git://github.com/TEAMMATES/teammates.git","ssh_url":"git@github.com:TEAMMATES/teammates.git","clone_url":"https://github.com/TEAMMATES/teammates.git","svn_url":"https://github.com/TEAMMATES/teammates","homepage":"http://teammatesv4.appspot.com/","size":197217,"stargazers_count":126,"watchers_count":126,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":328,"mirror_url":null,"open_issues_count":483,"forks":328,"open_issues":483,"watchers":126,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6058"},"html":{"href":"https://github.com/TEAMMATES/teammates/pull/6058"},"issue":{"href":"https://api.github.com/repos/TEAMMATES/teammates/issues/6058"},"comments":{"href":"https://api.github.com/repos/TEAMMATES/teammates/issues/6058/comments"},"review_comments":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6058/comments"},"review_comment":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TEAMMATES/teammates/pulls/6058/commits"},"statuses":{"href":"https://api.github.com/repos/TEAMMATES/teammates/statuses/4df397bb25b012ebbb9a2ac4406ef86212c78b40"}}}}
{"actor":{"display_login":"damithc"}}