{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/comments/139149564","pull_request_review_id":63043087,"id":139149564,"diff_hunk":"@@ -0,0 +1,44 @@\n+const config = require('../../../knexfile').web\n+const knex = require('knex')(config)\n+\n+module.exports = function () {\n+  return knex('workload_points')\n+    .first('id AS workloadPointsId',\n+            'comm_tier_1 AS commA',\n+            'comm_tier_2 AS commB1',\n+            'comm_tier_3 AS commB2',\n+            'comm_tier_4 AS commC1',\n+            'comm_tier_5 AS commC2',\n+            'comm_tier_6 AS commD1',\n+            'comm_tier_7 AS commD2',\n+            'cust_tier_1 AS cusA',\n+            'cust_tier_2 AS cusB1',\n+            'cust_tier_3 AS cusB2',\n+            'cust_tier_4 AS cusC1',\n+            'cust_tier_5 AS cusC2',\n+            'cust_tier_6 AS cusD1',\n+            'cust_tier_7 AS cusD2',\n+            'lic_tier_1 AS licA',\n+            'lic_tier_2 AS licB1',\n+            'lic_tier_3 AS licB2',\n+            'lic_tier_4 AS licC1',\n+            'lic_tier_5 AS licC2',\n+            'lic_tier_6 AS licD1',\n+            'lic_tier_7 AS licD2',\n+            // TODO: Possibly update this to store AD username rather than id?\n+            'user_id AS updatedByUserId',\n+            'sdr AS sdr',\n+            'sdr_conversion AS sdrConversion',\n+            'nominal_target_spo AS nominalTargetPso',\n+            'nominal_target_po AS nominalTargetPo',\n+            'default_contracted_hours_po AS defaultContractedHoursPo',\n+            'default_contracted_hours_pso AS defaultContractedHoursPso',\n+            'weighting_o AS weightingOverdue',\n+            'weighting_w AS weightingWarrants',\n+            'weighting_u AS weightingUpw',\n+            'paroms_enabled AS paromsEnabled',","path":"app/services/data/get-workload-points.js","position":39,"original_position":39,"commit_id":"7091b4012f4d3a0912c695c40ab7ecee37a09dd1","original_commit_id":"7091b4012f4d3a0912c695c40ab7ecee37a09dd1","user":{"login":"tswann","id":509115,"avatar_url":"https://avatars1.githubusercontent.com/u/509115?v=4","gravatar_id":"","url":"https://api.github.com/users/tswann","html_url":"https://github.com/tswann","followers_url":"https://api.github.com/users/tswann/followers","following_url":"https://api.github.com/users/tswann/following{/other_user}","gists_url":"https://api.github.com/users/tswann/gists{/gist_id}","starred_url":"https://api.github.com/users/tswann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tswann/subscriptions","organizations_url":"https://api.github.com/users/tswann/orgs","repos_url":"https://api.github.com/users/tswann/repos","events_url":"https://api.github.com/users/tswann/events{/privacy}","received_events_url":"https://api.github.com/users/tswann/received_events","type":"User","site_admin":false},"body":"Think we can lost the Enabled flag - this will not be used.","created_at":"2017-09-15T13:33:50Z","updated_at":"2017-09-15T13:43:20Z","html_url":"https://github.com/ministryofjustice/wmt-web/pull/127#discussion_r139149564","pull_request_url":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/127","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/comments/139149564"},"html":{"href":"https://github.com/ministryofjustice/wmt-web/pull/127#discussion_r139149564"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/127"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/127","id":140860743,"html_url":"https://github.com/ministryofjustice/wmt-web/pull/127","diff_url":"https://github.com/ministryofjustice/wmt-web/pull/127.diff","patch_url":"https://github.com/ministryofjustice/wmt-web/pull/127.patch","issue_url":"https://api.github.com/repos/ministryofjustice/wmt-web/issues/127","number":127,"state":"open","locked":false,"title":"Feature/wmt 823/workload points","user":{"login":"caoimheb","id":9531189,"avatar_url":"https://avatars1.githubusercontent.com/u/9531189?v=4","gravatar_id":"","url":"https://api.github.com/users/caoimheb","html_url":"https://github.com/caoimheb","followers_url":"https://api.github.com/users/caoimheb/followers","following_url":"https://api.github.com/users/caoimheb/following{/other_user}","gists_url":"https://api.github.com/users/caoimheb/gists{/gist_id}","starred_url":"https://api.github.com/users/caoimheb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caoimheb/subscriptions","organizations_url":"https://api.github.com/users/caoimheb/orgs","repos_url":"https://api.github.com/users/caoimheb/repos","events_url":"https://api.github.com/users/caoimheb/events{/privacy}","received_events_url":"https://api.github.com/users/caoimheb/received_events","type":"User","site_admin":false},"body":"Add all files needed for view / update workload points admin screen.\r\n\r\nAlso, update several integration tests to insert test data (so they do not rely on the underlying seed data in DB)","created_at":"2017-09-13T15:37:37Z","updated_at":"2017-09-15T13:43:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b497e3c2d454b230a1b7bf1b5528c36061f0d1cd","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tsheppard01","id":8913712,"avatar_url":"https://avatars3.githubusercontent.com/u/8913712?v=4","gravatar_id":"","url":"https://api.github.com/users/tsheppard01","html_url":"https://github.com/tsheppard01","followers_url":"https://api.github.com/users/tsheppard01/followers","following_url":"https://api.github.com/users/tsheppard01/following{/other_user}","gists_url":"https://api.github.com/users/tsheppard01/gists{/gist_id}","starred_url":"https://api.github.com/users/tsheppard01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsheppard01/subscriptions","organizations_url":"https://api.github.com/users/tsheppard01/orgs","repos_url":"https://api.github.com/users/tsheppard01/repos","events_url":"https://api.github.com/users/tsheppard01/events{/privacy}","received_events_url":"https://api.github.com/users/tsheppard01/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/127/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/127/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/wmt-web/issues/127/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/wmt-web/statuses/7091b4012f4d3a0912c695c40ab7ecee37a09dd1","head":{"label":"ministryofjustice:feature/wmt-823/workload-points","ref":"feature/wmt-823/workload-points","sha":"7091b4012f4d3a0912c695c40ab7ecee37a09dd1","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars3.githubusercontent.com/u/2203574?v=4","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":86353151,"name":"wmt-web","full_name":"ministryofjustice/wmt-web","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars3.githubusercontent.com/u/2203574?v=4","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/wmt-web","description":null,"fork":false,"url":"https://api.github.com/repos/ministryofjustice/wmt-web","forks_url":"https://api.github.com/repos/ministryofjustice/wmt-web/forks","keys_url":"https://api.github.com/repos/ministryofjustice/wmt-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/wmt-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/wmt-web/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/wmt-web/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/wmt-web/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/wmt-web/events","assignees_url":"https://api.github.com/repos/ministryofjustice/wmt-web/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/wmt-web/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/wmt-web/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/wmt-web/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/wmt-web/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/wmt-web/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/wmt-web/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/wmt-web/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/wmt-web/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/wmt-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/wmt-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/wmt-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/wmt-web/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/wmt-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/wmt-web/merges","archive_url":"https://api.github.com/repos/ministryofjustice/wmt-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/wmt-web/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/wmt-web/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/wmt-web/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/wmt-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/wmt-web/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/wmt-web/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/wmt-web/deployments","created_at":"2017-03-27T15:37:03Z","updated_at":"2017-03-28T09:41:24Z","pushed_at":"2017-09-14T16:13:17Z","git_url":"git://github.com/ministryofjustice/wmt-web.git","ssh_url":"git@github.com:ministryofjustice/wmt-web.git","clone_url":"https://github.com/ministryofjustice/wmt-web.git","svn_url":"https://github.com/ministryofjustice/wmt-web","homepage":null,"size":2818,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"d944cd0fda2f441b72a37f65f4f79622309f8d09","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars3.githubusercontent.com/u/2203574?v=4","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":86353151,"name":"wmt-web","full_name":"ministryofjustice/wmt-web","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars3.githubusercontent.com/u/2203574?v=4","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/wmt-web","description":null,"fork":false,"url":"https://api.github.com/repos/ministryofjustice/wmt-web","forks_url":"https://api.github.com/repos/ministryofjustice/wmt-web/forks","keys_url":"https://api.github.com/repos/ministryofjustice/wmt-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/wmt-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/wmt-web/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/wmt-web/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/wmt-web/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/wmt-web/events","assignees_url":"https://api.github.com/repos/ministryofjustice/wmt-web/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/wmt-web/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/wmt-web/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/wmt-web/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/wmt-web/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/wmt-web/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/wmt-web/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/wmt-web/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/wmt-web/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/wmt-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/wmt-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/wmt-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/wmt-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/wmt-web/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/wmt-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/wmt-web/merges","archive_url":"https://api.github.com/repos/ministryofjustice/wmt-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/wmt-web/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/wmt-web/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/wmt-web/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/wmt-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/wmt-web/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/wmt-web/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/wmt-web/deployments","created_at":"2017-03-27T15:37:03Z","updated_at":"2017-03-28T09:41:24Z","pushed_at":"2017-09-14T16:13:17Z","git_url":"git://github.com/ministryofjustice/wmt-web.git","ssh_url":"git@github.com:ministryofjustice/wmt-web.git","clone_url":"https://github.com/ministryofjustice/wmt-web.git","svn_url":"https://github.com/ministryofjustice/wmt-web","homepage":null,"size":2818,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/127"},"html":{"href":"https://github.com/ministryofjustice/wmt-web/pull/127"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/issues/127"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/issues/127/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/127/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/pulls/127/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/wmt-web/statuses/7091b4012f4d3a0912c695c40ab7ecee37a09dd1"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"tswann"}}