{"action":"created","comment":{"url":"https://api.github.com/repos/promisasu/Portal/pulls/comments/61694091","id":61694091,"diff_hunk":"@@ -124,6 +127,10 @@ function trialView (request, reply) {\n \n             const endDate = processRules(ruleValues, Date.now());\n \n+            if (request.query.requestType === 'ajaxRequest') {","path":"controller/handler/trial.js","position":33,"original_position":33,"commit_id":"76415c0f9029a544af56e37ee1364d94b40c7e25","original_commit_id":"76415c0f9029a544af56e37ee1364d94b40c7e25","user":{"login":"ChristianMurphy","id":3107513,"avatar_url":"https://avatars.githubusercontent.com/u/3107513?v=3","gravatar_id":"","url":"https://api.github.com/users/ChristianMurphy","html_url":"https://github.com/ChristianMurphy","followers_url":"https://api.github.com/users/ChristianMurphy/followers","following_url":"https://api.github.com/users/ChristianMurphy/following{/other_user}","gists_url":"https://api.github.com/users/ChristianMurphy/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristianMurphy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristianMurphy/subscriptions","organizations_url":"https://api.github.com/users/ChristianMurphy/orgs","repos_url":"https://api.github.com/users/ChristianMurphy/repos","events_url":"https://api.github.com/users/ChristianMurphy/events{/privacy}","received_events_url":"https://api.github.com/users/ChristianMurphy/received_events","type":"User","site_admin":false},"body":"I can see that.\r\nA view suddenly becoming an API based off an arbitrary variable (to me) seems unexpected.\r\nHaving a separate API would follow the [principle of least astonishment](https://en.wikipedia.org/wiki/Principle_of_least_astonishment).","created_at":"2016-05-01T22:13:42Z","updated_at":"2016-05-01T22:13:42Z","html_url":"https://github.com/promisasu/Portal/pull/358#discussion_r61694091","pull_request_url":"https://api.github.com/repos/promisasu/Portal/pulls/358","_links":{"self":{"href":"https://api.github.com/repos/promisasu/Portal/pulls/comments/61694091"},"html":{"href":"https://github.com/promisasu/Portal/pull/358#discussion_r61694091"},"pull_request":{"href":"https://api.github.com/repos/promisasu/Portal/pulls/358"}}},"pull_request":{"url":"https://api.github.com/repos/promisasu/Portal/pulls/358","id":67656833,"html_url":"https://github.com/promisasu/Portal/pull/358","diff_url":"https://github.com/promisasu/Portal/pull/358.diff","patch_url":"https://github.com/promisasu/Portal/pull/358.patch","issue_url":"https://api.github.com/repos/promisasu/Portal/issues/358","number":358,"state":"open","locked":false,"title":"User story 457","user":{"login":"shahsyedzafar","id":14165530,"avatar_url":"https://avatars.githubusercontent.com/u/14165530?v=3","gravatar_id":"","url":"https://api.github.com/users/shahsyedzafar","html_url":"https://github.com/shahsyedzafar","followers_url":"https://api.github.com/users/shahsyedzafar/followers","following_url":"https://api.github.com/users/shahsyedzafar/following{/other_user}","gists_url":"https://api.github.com/users/shahsyedzafar/gists{/gist_id}","starred_url":"https://api.github.com/users/shahsyedzafar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shahsyedzafar/subscriptions","organizations_url":"https://api.github.com/users/shahsyedzafar/orgs","repos_url":"https://api.github.com/users/shahsyedzafar/repos","events_url":"https://api.github.com/users/shahsyedzafar/events{/privacy}","received_events_url":"https://api.github.com/users/shahsyedzafar/received_events","type":"User","site_admin":false},"body":"<!--\r\n1. Ensure Pull Request is targeting the `development` branch\r\n2. Provide the requested information\r\n-->\r\n**Taiga User Story**\r\nuser story 457: Embedding date picker in the donut chart so that the user can select a date range to view the compliance levels of patients\r\n\r\n**Taiga Task(s)**\r\n*Adding ajax functionality\r\n*Adding check button\r\n\r\n**What did you change?**\r\n*Added a check button and ajax functionality to it\r\n\r\n**How can we test?**\r\n*Donut chart should properly render when dates are changed\r\n","created_at":"2016-04-25T01:22:36Z","updated_at":"2016-05-01T22:13:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c38745b15f1ef35e880f295becec23fbb4b2c4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/promisasu/Portal/pulls/358/commits","review_comments_url":"https://api.github.com/repos/promisasu/Portal/pulls/358/comments","review_comment_url":"https://api.github.com/repos/promisasu/Portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/promisasu/Portal/issues/358/comments","statuses_url":"https://api.github.com/repos/promisasu/Portal/statuses/76415c0f9029a544af56e37ee1364d94b40c7e25","head":{"label":"promisasu:user-story-457","ref":"user-story-457","sha":"76415c0f9029a544af56e37ee1364d94b40c7e25","user":{"login":"promisasu","id":16406149,"avatar_url":"https://avatars.githubusercontent.com/u/16406149?v=3","gravatar_id":"","url":"https://api.github.com/users/promisasu","html_url":"https://github.com/promisasu","followers_url":"https://api.github.com/users/promisasu/followers","following_url":"https://api.github.com/users/promisasu/following{/other_user}","gists_url":"https://api.github.com/users/promisasu/gists{/gist_id}","starred_url":"https://api.github.com/users/promisasu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/promisasu/subscriptions","organizations_url":"https://api.github.com/users/promisasu/orgs","repos_url":"https://api.github.com/users/promisasu/repos","events_url":"https://api.github.com/users/promisasu/events{/privacy}","received_events_url":"https://api.github.com/users/promisasu/received_events","type":"Organization","site_admin":false},"repo":{"id":42970270,"name":"Portal","full_name":"promisasu/Portal","owner":{"login":"promisasu","id":16406149,"avatar_url":"https://avatars.githubusercontent.com/u/16406149?v=3","gravatar_id":"","url":"https://api.github.com/users/promisasu","html_url":"https://github.com/promisasu","followers_url":"https://api.github.com/users/promisasu/followers","following_url":"https://api.github.com/users/promisasu/following{/other_user}","gists_url":"https://api.github.com/users/promisasu/gists{/gist_id}","starred_url":"https://api.github.com/users/promisasu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/promisasu/subscriptions","organizations_url":"https://api.github.com/users/promisasu/orgs","repos_url":"https://api.github.com/users/promisasu/repos","events_url":"https://api.github.com/users/promisasu/events{/privacy}","received_events_url":"https://api.github.com/users/promisasu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/promisasu/Portal","description":"A portal to allow clinician to view and manage Promis surveys","fork":false,"url":"https://api.github.com/repos/promisasu/Portal","forks_url":"https://api.github.com/repos/promisasu/Portal/forks","keys_url":"https://api.github.com/repos/promisasu/Portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/promisasu/Portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/promisasu/Portal/teams","hooks_url":"https://api.github.com/repos/promisasu/Portal/hooks","issue_events_url":"https://api.github.com/repos/promisasu/Portal/issues/events{/number}","events_url":"https://api.github.com/repos/promisasu/Portal/events","assignees_url":"https://api.github.com/repos/promisasu/Portal/assignees{/user}","branches_url":"https://api.github.com/repos/promisasu/Portal/branches{/branch}","tags_url":"https://api.github.com/repos/promisasu/Portal/tags","blobs_url":"https://api.github.com/repos/promisasu/Portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/promisasu/Portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/promisasu/Portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/promisasu/Portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/promisasu/Portal/statuses/{sha}","languages_url":"https://api.github.com/repos/promisasu/Portal/languages","stargazers_url":"https://api.github.com/repos/promisasu/Portal/stargazers","contributors_url":"https://api.github.com/repos/promisasu/Portal/contributors","subscribers_url":"https://api.github.com/repos/promisasu/Portal/subscribers","subscription_url":"https://api.github.com/repos/promisasu/Portal/subscription","commits_url":"https://api.github.com/repos/promisasu/Portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/promisasu/Portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/promisasu/Portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/promisasu/Portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/promisasu/Portal/contents/{+path}","compare_url":"https://api.github.com/repos/promisasu/Portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/promisasu/Portal/merges","archive_url":"https://api.github.com/repos/promisasu/Portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/promisasu/Portal/downloads","issues_url":"https://api.github.com/repos/promisasu/Portal/issues{/number}","pulls_url":"https://api.github.com/repos/promisasu/Portal/pulls{/number}","milestones_url":"https://api.github.com/repos/promisasu/Portal/milestones{/number}","notifications_url":"https://api.github.com/repos/promisasu/Portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/promisasu/Portal/labels{/name}","releases_url":"https://api.github.com/repos/promisasu/Portal/releases{/id}","deployments_url":"https://api.github.com/repos/promisasu/Portal/deployments","created_at":"2015-09-23T01:10:13Z","updated_at":"2016-03-27T05:54:59Z","pushed_at":"2016-05-01T09:27:53Z","git_url":"git://github.com/promisasu/Portal.git","ssh_url":"git@github.com:promisasu/Portal.git","clone_url":"https://github.com/promisasu/Portal.git","svn_url":"https://github.com/promisasu/Portal","homepage":"","size":2303,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":3,"default_branch":"master"}},"base":{"label":"promisasu:development","ref":"development","sha":"88ea7e5f20c42f6b603aea5ee4741d4903fd9702","user":{"login":"promisasu","id":16406149,"avatar_url":"https://avatars.githubusercontent.com/u/16406149?v=3","gravatar_id":"","url":"https://api.github.com/users/promisasu","html_url":"https://github.com/promisasu","followers_url":"https://api.github.com/users/promisasu/followers","following_url":"https://api.github.com/users/promisasu/following{/other_user}","gists_url":"https://api.github.com/users/promisasu/gists{/gist_id}","starred_url":"https://api.github.com/users/promisasu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/promisasu/subscriptions","organizations_url":"https://api.github.com/users/promisasu/orgs","repos_url":"https://api.github.com/users/promisasu/repos","events_url":"https://api.github.com/users/promisasu/events{/privacy}","received_events_url":"https://api.github.com/users/promisasu/received_events","type":"Organization","site_admin":false},"repo":{"id":42970270,"name":"Portal","full_name":"promisasu/Portal","owner":{"login":"promisasu","id":16406149,"avatar_url":"https://avatars.githubusercontent.com/u/16406149?v=3","gravatar_id":"","url":"https://api.github.com/users/promisasu","html_url":"https://github.com/promisasu","followers_url":"https://api.github.com/users/promisasu/followers","following_url":"https://api.github.com/users/promisasu/following{/other_user}","gists_url":"https://api.github.com/users/promisasu/gists{/gist_id}","starred_url":"https://api.github.com/users/promisasu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/promisasu/subscriptions","organizations_url":"https://api.github.com/users/promisasu/orgs","repos_url":"https://api.github.com/users/promisasu/repos","events_url":"https://api.github.com/users/promisasu/events{/privacy}","received_events_url":"https://api.github.com/users/promisasu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/promisasu/Portal","description":"A portal to allow clinician to view and manage Promis surveys","fork":false,"url":"https://api.github.com/repos/promisasu/Portal","forks_url":"https://api.github.com/repos/promisasu/Portal/forks","keys_url":"https://api.github.com/repos/promisasu/Portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/promisasu/Portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/promisasu/Portal/teams","hooks_url":"https://api.github.com/repos/promisasu/Portal/hooks","issue_events_url":"https://api.github.com/repos/promisasu/Portal/issues/events{/number}","events_url":"https://api.github.com/repos/promisasu/Portal/events","assignees_url":"https://api.github.com/repos/promisasu/Portal/assignees{/user}","branches_url":"https://api.github.com/repos/promisasu/Portal/branches{/branch}","tags_url":"https://api.github.com/repos/promisasu/Portal/tags","blobs_url":"https://api.github.com/repos/promisasu/Portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/promisasu/Portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/promisasu/Portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/promisasu/Portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/promisasu/Portal/statuses/{sha}","languages_url":"https://api.github.com/repos/promisasu/Portal/languages","stargazers_url":"https://api.github.com/repos/promisasu/Portal/stargazers","contributors_url":"https://api.github.com/repos/promisasu/Portal/contributors","subscribers_url":"https://api.github.com/repos/promisasu/Portal/subscribers","subscription_url":"https://api.github.com/repos/promisasu/Portal/subscription","commits_url":"https://api.github.com/repos/promisasu/Portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/promisasu/Portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/promisasu/Portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/promisasu/Portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/promisasu/Portal/contents/{+path}","compare_url":"https://api.github.com/repos/promisasu/Portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/promisasu/Portal/merges","archive_url":"https://api.github.com/repos/promisasu/Portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/promisasu/Portal/downloads","issues_url":"https://api.github.com/repos/promisasu/Portal/issues{/number}","pulls_url":"https://api.github.com/repos/promisasu/Portal/pulls{/number}","milestones_url":"https://api.github.com/repos/promisasu/Portal/milestones{/number}","notifications_url":"https://api.github.com/repos/promisasu/Portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/promisasu/Portal/labels{/name}","releases_url":"https://api.github.com/repos/promisasu/Portal/releases{/id}","deployments_url":"https://api.github.com/repos/promisasu/Portal/deployments","created_at":"2015-09-23T01:10:13Z","updated_at":"2016-03-27T05:54:59Z","pushed_at":"2016-05-01T09:27:53Z","git_url":"git://github.com/promisasu/Portal.git","ssh_url":"git@github.com:promisasu/Portal.git","clone_url":"https://github.com/promisasu/Portal.git","svn_url":"https://github.com/promisasu/Portal","homepage":"","size":2303,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/promisasu/Portal/pulls/358"},"html":{"href":"https://github.com/promisasu/Portal/pull/358"},"issue":{"href":"https://api.github.com/repos/promisasu/Portal/issues/358"},"comments":{"href":"https://api.github.com/repos/promisasu/Portal/issues/358/comments"},"review_comments":{"href":"https://api.github.com/repos/promisasu/Portal/pulls/358/comments"},"review_comment":{"href":"https://api.github.com/repos/promisasu/Portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/promisasu/Portal/pulls/358/commits"},"statuses":{"href":"https://api.github.com/repos/promisasu/Portal/statuses/76415c0f9029a544af56e37ee1364d94b40c7e25"}}}}