{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments/103597109","pull_request_review_id":24387652,"id":103597109,"diff_hunk":"@@ -0,0 +1,13 @@\n+class DocumentController < ApplicationController\n+  before_action :verify_system_admin\n+\n+  def set_label\n+    document = Document.find(params[:id])\n+    document.update!(label: label_params)\n+    render json: {}\n+  end\n+\n+  def label_params\n+    params.require(:label)","path":"app/controllers/document_controller.rb","position":11,"original_position":11,"commit_id":"5c3b0565bbff9c714194c8244b4fac2e8cb7a877","original_commit_id":"c6f56386477ca540167962e6d2ba48995750defe","user":{"login":"mdbenjam","id":3885236,"avatar_url":"https://avatars2.githubusercontent.com/u/3885236?v=3","gravatar_id":"","url":"https://api.github.com/users/mdbenjam","html_url":"https://github.com/mdbenjam","followers_url":"https://api.github.com/users/mdbenjam/followers","following_url":"https://api.github.com/users/mdbenjam/following{/other_user}","gists_url":"https://api.github.com/users/mdbenjam/gists{/gist_id}","starred_url":"https://api.github.com/users/mdbenjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdbenjam/subscriptions","organizations_url":"https://api.github.com/users/mdbenjam/orgs","repos_url":"https://api.github.com/users/mdbenjam/repos","events_url":"https://api.github.com/users/mdbenjam/events{/privacy}","received_events_url":"https://api.github.com/users/mdbenjam/received_events","type":"User","site_admin":false},"body":"Updated to an enum to provide validation and clarity.","created_at":"2017-03-01T02:04:36Z","updated_at":"2017-03-01T02:04:37Z","html_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/1034#discussion_r103597109","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/1034","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments/103597109"},"html":{"href":"https://github.com/department-of-veterans-affairs/caseflow/pull/1034#discussion_r103597109"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/1034"}}},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/1034","id":108225389,"html_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/1034","diff_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/1034.diff","patch_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/1034.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/1034","number":1034,"state":"open","locked":false,"title":"Document labels","user":{"login":"mdbenjam","id":3885236,"avatar_url":"https://avatars2.githubusercontent.com/u/3885236?v=3","gravatar_id":"","url":"https://api.github.com/users/mdbenjam","html_url":"https://github.com/mdbenjam","followers_url":"https://api.github.com/users/mdbenjam/followers","following_url":"https://api.github.com/users/mdbenjam/following{/other_user}","gists_url":"https://api.github.com/users/mdbenjam/gists{/gist_id}","starred_url":"https://api.github.com/users/mdbenjam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdbenjam/subscriptions","organizations_url":"https://api.github.com/users/mdbenjam/orgs","repos_url":"https://api.github.com/users/mdbenjam/repos","events_url":"https://api.github.com/users/mdbenjam/events{/privacy}","received_events_url":"https://api.github.com/users/mdbenjam/received_events","type":"User","site_admin":false},"body":"This PR adds label functionality to the e-reader. Users, can now select a document type on the pdf view page. This label is saved in the document database, and shown on the pdf list view.\r\n\r\n**Test Plan**\r\n- [ ] Smoke test certification and dispatch\r\n- [x] Manually verify the labels\r\n  - [x] Selecting labels on the pdf view page is reflected on the pdf list page\r\n  - [x] Filtering by label shows a limited selection of documents on the list page\r\n\r\n![screen shot 2017-02-27 at 8 46 51 pm](https://cloud.githubusercontent.com/assets/3885236/23388025/e73e281c-fd2d-11e6-9e5f-9e15f1339550.png)\r\n","created_at":"2017-02-27T23:29:03Z","updated_at":"2017-03-01T02:04:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a1f0a2791a47e666ea88e7153cfaa19f22af5f2","assignee":{"login":"sharonwarner","id":4306128,"avatar_url":"https://avatars0.githubusercontent.com/u/4306128?v=3","gravatar_id":"","url":"https://api.github.com/users/sharonwarner","html_url":"https://github.com/sharonwarner","followers_url":"https://api.github.com/users/sharonwarner/followers","following_url":"https://api.github.com/users/sharonwarner/following{/other_user}","gists_url":"https://api.github.com/users/sharonwarner/gists{/gist_id}","starred_url":"https://api.github.com/users/sharonwarner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharonwarner/subscriptions","organizations_url":"https://api.github.com/users/sharonwarner/orgs","repos_url":"https://api.github.com/users/sharonwarner/repos","events_url":"https://api.github.com/users/sharonwarner/events{/privacy}","received_events_url":"https://api.github.com/users/sharonwarner/received_events","type":"User","site_admin":false},"assignees":[{"login":"sharonwarner","id":4306128,"avatar_url":"https://avatars0.githubusercontent.com/u/4306128?v=3","gravatar_id":"","url":"https://api.github.com/users/sharonwarner","html_url":"https://github.com/sharonwarner","followers_url":"https://api.github.com/users/sharonwarner/followers","following_url":"https://api.github.com/users/sharonwarner/following{/other_user}","gists_url":"https://api.github.com/users/sharonwarner/gists{/gist_id}","starred_url":"https://api.github.com/users/sharonwarner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharonwarner/subscriptions","organizations_url":"https://api.github.com/users/sharonwarner/orgs","repos_url":"https://api.github.com/users/sharonwarner/repos","events_url":"https://api.github.com/users/sharonwarner/events{/privacy}","received_events_url":"https://api.github.com/users/sharonwarner/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/1034/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/1034/comments","review_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/1034/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/5c3b0565bbff9c714194c8244b4fac2e8cb7a877","head":{"label":"department-of-veterans-affairs:mdbenjam-label","ref":"mdbenjam-label","sha":"5c3b0565bbff9c714194c8244b4fac2e8cb7a877","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars2.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":51449239,"name":"caseflow","full_name":"department-of-veterans-affairs/caseflow","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars2.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/caseflow","description":"Caseflow is a web application that enables the tracking and processing of appealed claims at the Board of Veterans' Appeals.","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/deployments","created_at":"2016-02-10T15:20:50Z","updated_at":"2017-02-07T20:29:15Z","pushed_at":"2017-03-01T02:04:16Z","git_url":"git://github.com/department-of-veterans-affairs/caseflow.git","ssh_url":"git@github.com:department-of-veterans-affairs/caseflow.git","clone_url":"https://github.com/department-of-veterans-affairs/caseflow.git","svn_url":"https://github.com/department-of-veterans-affairs/caseflow","homepage":"","size":8255,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":144,"forks":8,"open_issues":144,"watchers":4,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"8d7c5f3cdedfb7e462a78f3f7a513bb1004f44f1","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars2.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":51449239,"name":"caseflow","full_name":"department-of-veterans-affairs/caseflow","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars2.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/caseflow","description":"Caseflow is a web application that enables the tracking and processing of appealed claims at the Board of Veterans' Appeals.","fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/deployments","created_at":"2016-02-10T15:20:50Z","updated_at":"2017-02-07T20:29:15Z","pushed_at":"2017-03-01T02:04:16Z","git_url":"git://github.com/department-of-veterans-affairs/caseflow.git","ssh_url":"git@github.com:department-of-veterans-affairs/caseflow.git","clone_url":"https://github.com/department-of-veterans-affairs/caseflow.git","svn_url":"https://github.com/department-of-veterans-affairs/caseflow","homepage":"","size":8255,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":144,"forks":8,"open_issues":144,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/1034"},"html":{"href":"https://github.com/department-of-veterans-affairs/caseflow/pull/1034"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/1034"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/1034/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/1034/comments"},"review_comment":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/1034/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/5c3b0565bbff9c714194c8244b4fac2e8cb7a877"}}}}
{"actor":{"display_login":"mdbenjam"}}