{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments/42411077","id":42411077,"diff_hunk":"@@ -214,10 +215,61 @@ def case_ready_check\n     end\n   end\n \n-  # -- Helper Method --\n+  # -- Helper Methods --\n   def blank?(str)\n     # There is a blank? method in ActiveSupport, but avoiding since it'll do more things than just add this to String\n     str =~ /^\\s*$/\n   end\n \n+  def field_rollver(field_hash)\n+\n+    fields = field_hash.dup\n+    remarks_full = fields['14_REMARKS_INITIAL']\n+    remarks_page_1 = ''\n+    remarks_page_2 = ''\n+\n+    # Box 5A is capped at 200 characters (arbitrary choice), rollover to page 2 if over cap\n+    # TODO: For future PR, add to remarks_page_2\n+\n+    # Box 6A is capped at 200 characters (arbitrary choice), rollover to page 2 if over cap\n+    # TODO: For future PR, add to remarks_page_2\n+\n+    # Box 7A is capped at 200 characters (arbitrary choice), rollover to page 2 if over cap\n+    # TODO: For future PR, add to remarks_page_2\n+\n+    # Remarks box on page 1 can handle 713 characters straight or several newlines with 1 line sentences.\n+    # Newlines and the associated spacing make it hard to do figure out the amount of space remaining without much complexity.\n+    # To simplify, will rollover to page 2 after first newline and any characters past 695 characters before the first newline\n+    # 695 and not 713, allows for ' (continued)' to be appended for multiple lines ... no, the math doesn't make sense, but avoids word wrap algorithm in the PDF generator\n+    unless blank?(remarks_full)\n+      remarks_lines = remarks_full.try('split', \"\\n\")","path":"app/controllers/web_controller.rb","position":40,"original_position":40,"commit_id":"c09c0fa55ee4d80a1e9100fea42e947a57c12d90","original_commit_id":"37dcea31a8d712903da90bef3fa56e52d2fde225","user":{"login":"plusjeff","id":950486,"avatar_url":"https://avatars.githubusercontent.com/u/950486?v=3","gravatar_id":"","url":"https://api.github.com/users/plusjeff","html_url":"https://github.com/plusjeff","followers_url":"https://api.github.com/users/plusjeff/followers","following_url":"https://api.github.com/users/plusjeff/following{/other_user}","gists_url":"https://api.github.com/users/plusjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/plusjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plusjeff/subscriptions","organizations_url":"https://api.github.com/users/plusjeff/orgs","repos_url":"https://api.github.com/users/plusjeff/repos","events_url":"https://api.github.com/users/plusjeff/events{/privacy}","received_events_url":"https://api.github.com/users/plusjeff/received_events","type":"User","site_admin":false},"body":"Oh wait! I see what you're saying though. Let me fix this.","created_at":"2015-10-19T18:54:08Z","updated_at":"2015-10-19T18:54:08Z","html_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/39#discussion_r42411077","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/comments/42411077"},"html":{"href":"https://github.com/department-of-veterans-affairs/caseflow/pull/39#discussion_r42411077"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/39","id":48109399,"html_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/39","diff_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/39.diff","patch_url":"https://github.com/department-of-veterans-affairs/caseflow/pull/39.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/39","number":39,"state":"open","locked":false,"title":"Remarks field can jump into the overflow page","user":{"login":"plusjeff","id":950486,"avatar_url":"https://avatars.githubusercontent.com/u/950486?v=3","gravatar_id":"","url":"https://api.github.com/users/plusjeff","html_url":"https://github.com/plusjeff","followers_url":"https://api.github.com/users/plusjeff/followers","following_url":"https://api.github.com/users/plusjeff/following{/other_user}","gists_url":"https://api.github.com/users/plusjeff/gists{/gist_id}","starred_url":"https://api.github.com/users/plusjeff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plusjeff/subscriptions","organizations_url":"https://api.github.com/users/plusjeff/orgs","repos_url":"https://api.github.com/users/plusjeff/repos","events_url":"https://api.github.com/users/plusjeff/events{/privacy}","received_events_url":"https://api.github.com/users/plusjeff/received_events","type":"User","site_admin":false},"body":"Read for review @alex or @paultag . I tried to comment the code on how I implemented this, but happy to answer any questions.\r\n\r\nFixes #12 ","created_at":"2015-10-19T18:41:03Z","updated_at":"2015-10-19T18:54:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e88e9a01cde381708eb263656fbd92bdcef47628","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/39/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/39/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/39/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/c09c0fa55ee4d80a1e9100fea42e947a57c12d90","head":{"label":"department-of-veterans-affairs:spillover","ref":"spillover","sha":"c09c0fa55ee4d80a1e9100fea42e947a57c12d90","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.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":44323315,"name":"caseflow","full_name":"department-of-veterans-affairs/caseflow","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.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":"","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}","created_at":"2015-10-15T14:32:04Z","updated_at":"2015-10-16T15:33:15Z","pushed_at":"2015-10-19T18:50:29Z","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":null,"size":8987,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":28,"forks":1,"open_issues":28,"watchers":2,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"94daed73302b32abd9f4a7d41d156622a8ca03ce","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.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":44323315,"name":"caseflow","full_name":"department-of-veterans-affairs/caseflow","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.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":"","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}","created_at":"2015-10-15T14:32:04Z","updated_at":"2015-10-16T15:33:15Z","pushed_at":"2015-10-19T18:50:29Z","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":null,"size":8987,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":28,"forks":1,"open_issues":28,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/39"},"html":{"href":"https://github.com/department-of-veterans-affairs/caseflow/pull/39"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/39"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/pulls/39/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/39/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/caseflow/statuses/c09c0fa55ee4d80a1e9100fea42e947a57c12d90"}}}}