{"action":"created","comment":{"url":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/comments/76908835","id":76908835,"diff_hunk":"@@ -0,0 +1,125 @@\n+require \"rails_helper\"\n+\n+RSpec.feature \"Response Plan Lifecycle\" do\n+  include Permissions\n+\n+  describe \"creating a draft\" do\n+    context \"when the officer is not an admin\" do\n+      scenario \"they cannot create a draft\"\n+    end\n+\n+    context \"when the officer is an admin\" do\n+      scenario \"they can draft a plan for a person who doesn't have one\" do\n+        officer = create(:officer)\n+        sign_in_officer(officer)\n+        stub_admin_permissions(officer)\n+        person = create(:person)\n+\n+        visit person_path(person)\n+        click_on t(\"response_plans.new.action\")\n+\n+        expect(page).to have_content t(\"response_plans.create.success.from_scratch\")\n+      end\n+\n+      scenario \"they can draft a new plan for a person who already has one\" do\n+        officer = create(:officer)\n+        stub_admin_permissions(officer)\n+        sign_in_officer(officer)\n+        person = create(:response_plan, :approved).person\n+\n+        visit person_path(person)\n+        click_on t(\"response_plans.draft.new\")\n+\n+        expect(page).to have_content t(\"response_plans.create.success.from_previous\")\n+      end\n+\n+      xscenario \"they cannot create multiple drafts for a person at the same time\" do","path":"spec/features/response_plan_lifecycle_spec.rb","position":36,"original_position":36,"commit_id":"d7ad594cefc95a0c9a0bb39e5edeb745b8376950","original_commit_id":"d7ad594cefc95a0c9a0bb39e5edeb745b8376950","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Line is too long. [85/80]","created_at":"2016-08-31T01:10:31Z","updated_at":"2016-08-31T01:10:31Z","html_url":"https://github.com/codeforamerica/crisisresponse/pull/234#discussion_r76908835","pull_request_url":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/234","_links":{"self":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/comments/76908835"},"html":{"href":"https://github.com/codeforamerica/crisisresponse/pull/234#discussion_r76908835"},"pull_request":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/234"}}},"pull_request":{"url":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/234","id":83180670,"html_url":"https://github.com/codeforamerica/crisisresponse/pull/234","diff_url":"https://github.com/codeforamerica/crisisresponse/pull/234.diff","patch_url":"https://github.com/codeforamerica/crisisresponse/pull/234.patch","issue_url":"https://api.github.com/repos/codeforamerica/crisisresponse/issues/234","number":234,"state":"open","locked":false,"title":"Officers can manage drafts before submitting","user":{"login":"graysonwright","id":829576,"avatar_url":"https://avatars.githubusercontent.com/u/829576?v=3","gravatar_id":"","url":"https://api.github.com/users/graysonwright","html_url":"https://github.com/graysonwright","followers_url":"https://api.github.com/users/graysonwright/followers","following_url":"https://api.github.com/users/graysonwright/following{/other_user}","gists_url":"https://api.github.com/users/graysonwright/gists{/gist_id}","starred_url":"https://api.github.com/users/graysonwright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/graysonwright/subscriptions","organizations_url":"https://api.github.com/users/graysonwright/orgs","repos_url":"https://api.github.com/users/graysonwright/repos","events_url":"https://api.github.com/users/graysonwright/events{/privacy}","received_events_url":"https://api.github.com/users/graysonwright/received_events","type":"User","site_admin":false},"body":"## Problem\n\nOfficers need to create, edit, and submit response plan changes\nall in a single session.\n\nThis is a lot of information for officers to fill out,\nand they would like to save and return to response plan drafts.\n\nThey would also like to be able to review response plan drafts\nbefore they are submitted to their sergeant for approval.\n\n## Solution\n\nAdjust the response plan form logic\nso that editing a response plan doesn't automatically create a copy of\nthe existing plan.\n\nInstead, before editing a plan officers must create a new \"draft\".\nThey can edit and preview the draft as much as they like\nbefore submitting it to their Sgt. for approval.\n\nOnce they submit the draft for approval,\nit cannot be edited again.","created_at":"2016-08-29T22:43:18Z","updated_at":"2016-08-31T01:10:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37a49516bd1ec753525bab150ac130c7fbe38ec9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/234/commits","review_comments_url":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/234/comments","review_comment_url":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codeforamerica/crisisresponse/issues/234/comments","statuses_url":"https://api.github.com/repos/codeforamerica/crisisresponse/statuses/d7ad594cefc95a0c9a0bb39e5edeb745b8376950","head":{"label":"codeforamerica:drafts2","ref":"drafts2","sha":"d7ad594cefc95a0c9a0bb39e5edeb745b8376950","user":{"login":"codeforamerica","id":337792,"avatar_url":"https://avatars.githubusercontent.com/u/337792?v=3","gravatar_id":"","url":"https://api.github.com/users/codeforamerica","html_url":"https://github.com/codeforamerica","followers_url":"https://api.github.com/users/codeforamerica/followers","following_url":"https://api.github.com/users/codeforamerica/following{/other_user}","gists_url":"https://api.github.com/users/codeforamerica/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforamerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforamerica/subscriptions","organizations_url":"https://api.github.com/users/codeforamerica/orgs","repos_url":"https://api.github.com/users/codeforamerica/repos","events_url":"https://api.github.com/users/codeforamerica/events{/privacy}","received_events_url":"https://api.github.com/users/codeforamerica/received_events","type":"Organization","site_admin":false},"repo":{"id":55091777,"name":"crisisresponse","full_name":"codeforamerica/crisisresponse","owner":{"login":"codeforamerica","id":337792,"avatar_url":"https://avatars.githubusercontent.com/u/337792?v=3","gravatar_id":"","url":"https://api.github.com/users/codeforamerica","html_url":"https://github.com/codeforamerica","followers_url":"https://api.github.com/users/codeforamerica/followers","following_url":"https://api.github.com/users/codeforamerica/following{/other_user}","gists_url":"https://api.github.com/users/codeforamerica/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforamerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforamerica/subscriptions","organizations_url":"https://api.github.com/users/codeforamerica/orgs","repos_url":"https://api.github.com/users/codeforamerica/repos","events_url":"https://api.github.com/users/codeforamerica/events{/privacy}","received_events_url":"https://api.github.com/users/codeforamerica/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeforamerica/crisisresponse","description":"An internal tool to help the Seattle Police Department respond to the needs of people in crisis","fork":false,"url":"https://api.github.com/repos/codeforamerica/crisisresponse","forks_url":"https://api.github.com/repos/codeforamerica/crisisresponse/forks","keys_url":"https://api.github.com/repos/codeforamerica/crisisresponse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeforamerica/crisisresponse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeforamerica/crisisresponse/teams","hooks_url":"https://api.github.com/repos/codeforamerica/crisisresponse/hooks","issue_events_url":"https://api.github.com/repos/codeforamerica/crisisresponse/issues/events{/number}","events_url":"https://api.github.com/repos/codeforamerica/crisisresponse/events","assignees_url":"https://api.github.com/repos/codeforamerica/crisisresponse/assignees{/user}","branches_url":"https://api.github.com/repos/codeforamerica/crisisresponse/branches{/branch}","tags_url":"https://api.github.com/repos/codeforamerica/crisisresponse/tags","blobs_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeforamerica/crisisresponse/statuses/{sha}","languages_url":"https://api.github.com/repos/codeforamerica/crisisresponse/languages","stargazers_url":"https://api.github.com/repos/codeforamerica/crisisresponse/stargazers","contributors_url":"https://api.github.com/repos/codeforamerica/crisisresponse/contributors","subscribers_url":"https://api.github.com/repos/codeforamerica/crisisresponse/subscribers","subscription_url":"https://api.github.com/repos/codeforamerica/crisisresponse/subscription","commits_url":"https://api.github.com/repos/codeforamerica/crisisresponse/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeforamerica/crisisresponse/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeforamerica/crisisresponse/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeforamerica/crisisresponse/contents/{+path}","compare_url":"https://api.github.com/repos/codeforamerica/crisisresponse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeforamerica/crisisresponse/merges","archive_url":"https://api.github.com/repos/codeforamerica/crisisresponse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeforamerica/crisisresponse/downloads","issues_url":"https://api.github.com/repos/codeforamerica/crisisresponse/issues{/number}","pulls_url":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls{/number}","milestones_url":"https://api.github.com/repos/codeforamerica/crisisresponse/milestones{/number}","notifications_url":"https://api.github.com/repos/codeforamerica/crisisresponse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeforamerica/crisisresponse/labels{/name}","releases_url":"https://api.github.com/repos/codeforamerica/crisisresponse/releases{/id}","deployments_url":"https://api.github.com/repos/codeforamerica/crisisresponse/deployments","created_at":"2016-03-30T19:35:11Z","updated_at":"2016-08-30T21:58:34Z","pushed_at":"2016-08-31T01:10:24Z","git_url":"git://github.com/codeforamerica/crisisresponse.git","ssh_url":"git@github.com:codeforamerica/crisisresponse.git","clone_url":"https://github.com/codeforamerica/crisisresponse.git","svn_url":"https://github.com/codeforamerica/crisisresponse","homepage":null,"size":81526,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":2,"default_branch":"master"}},"base":{"label":"codeforamerica:master","ref":"master","sha":"4533e1f5f4969c3e3099b02cd459f83a9b60bf87","user":{"login":"codeforamerica","id":337792,"avatar_url":"https://avatars.githubusercontent.com/u/337792?v=3","gravatar_id":"","url":"https://api.github.com/users/codeforamerica","html_url":"https://github.com/codeforamerica","followers_url":"https://api.github.com/users/codeforamerica/followers","following_url":"https://api.github.com/users/codeforamerica/following{/other_user}","gists_url":"https://api.github.com/users/codeforamerica/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforamerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforamerica/subscriptions","organizations_url":"https://api.github.com/users/codeforamerica/orgs","repos_url":"https://api.github.com/users/codeforamerica/repos","events_url":"https://api.github.com/users/codeforamerica/events{/privacy}","received_events_url":"https://api.github.com/users/codeforamerica/received_events","type":"Organization","site_admin":false},"repo":{"id":55091777,"name":"crisisresponse","full_name":"codeforamerica/crisisresponse","owner":{"login":"codeforamerica","id":337792,"avatar_url":"https://avatars.githubusercontent.com/u/337792?v=3","gravatar_id":"","url":"https://api.github.com/users/codeforamerica","html_url":"https://github.com/codeforamerica","followers_url":"https://api.github.com/users/codeforamerica/followers","following_url":"https://api.github.com/users/codeforamerica/following{/other_user}","gists_url":"https://api.github.com/users/codeforamerica/gists{/gist_id}","starred_url":"https://api.github.com/users/codeforamerica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeforamerica/subscriptions","organizations_url":"https://api.github.com/users/codeforamerica/orgs","repos_url":"https://api.github.com/users/codeforamerica/repos","events_url":"https://api.github.com/users/codeforamerica/events{/privacy}","received_events_url":"https://api.github.com/users/codeforamerica/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeforamerica/crisisresponse","description":"An internal tool to help the Seattle Police Department respond to the needs of people in crisis","fork":false,"url":"https://api.github.com/repos/codeforamerica/crisisresponse","forks_url":"https://api.github.com/repos/codeforamerica/crisisresponse/forks","keys_url":"https://api.github.com/repos/codeforamerica/crisisresponse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeforamerica/crisisresponse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeforamerica/crisisresponse/teams","hooks_url":"https://api.github.com/repos/codeforamerica/crisisresponse/hooks","issue_events_url":"https://api.github.com/repos/codeforamerica/crisisresponse/issues/events{/number}","events_url":"https://api.github.com/repos/codeforamerica/crisisresponse/events","assignees_url":"https://api.github.com/repos/codeforamerica/crisisresponse/assignees{/user}","branches_url":"https://api.github.com/repos/codeforamerica/crisisresponse/branches{/branch}","tags_url":"https://api.github.com/repos/codeforamerica/crisisresponse/tags","blobs_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeforamerica/crisisresponse/statuses/{sha}","languages_url":"https://api.github.com/repos/codeforamerica/crisisresponse/languages","stargazers_url":"https://api.github.com/repos/codeforamerica/crisisresponse/stargazers","contributors_url":"https://api.github.com/repos/codeforamerica/crisisresponse/contributors","subscribers_url":"https://api.github.com/repos/codeforamerica/crisisresponse/subscribers","subscription_url":"https://api.github.com/repos/codeforamerica/crisisresponse/subscription","commits_url":"https://api.github.com/repos/codeforamerica/crisisresponse/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeforamerica/crisisresponse/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeforamerica/crisisresponse/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeforamerica/crisisresponse/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeforamerica/crisisresponse/contents/{+path}","compare_url":"https://api.github.com/repos/codeforamerica/crisisresponse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeforamerica/crisisresponse/merges","archive_url":"https://api.github.com/repos/codeforamerica/crisisresponse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeforamerica/crisisresponse/downloads","issues_url":"https://api.github.com/repos/codeforamerica/crisisresponse/issues{/number}","pulls_url":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls{/number}","milestones_url":"https://api.github.com/repos/codeforamerica/crisisresponse/milestones{/number}","notifications_url":"https://api.github.com/repos/codeforamerica/crisisresponse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeforamerica/crisisresponse/labels{/name}","releases_url":"https://api.github.com/repos/codeforamerica/crisisresponse/releases{/id}","deployments_url":"https://api.github.com/repos/codeforamerica/crisisresponse/deployments","created_at":"2016-03-30T19:35:11Z","updated_at":"2016-08-30T21:58:34Z","pushed_at":"2016-08-31T01:10:24Z","git_url":"git://github.com/codeforamerica/crisisresponse.git","ssh_url":"git@github.com:codeforamerica/crisisresponse.git","clone_url":"https://github.com/codeforamerica/crisisresponse.git","svn_url":"https://github.com/codeforamerica/crisisresponse","homepage":null,"size":81526,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":25,"forks":0,"open_issues":25,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/234"},"html":{"href":"https://github.com/codeforamerica/crisisresponse/pull/234"},"issue":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/issues/234"},"comments":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/issues/234/comments"},"review_comments":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/234/comments"},"review_comment":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/pulls/234/commits"},"statuses":{"href":"https://api.github.com/repos/codeforamerica/crisisresponse/statuses/d7ad594cefc95a0c9a0bb39e5edeb745b8376950"}}}}
{"actor":{"display_login":"houndci-bot"}}