{"action":"opened","number":606,"pull_request":{"url":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls/606","id":310412885,"node_id":"MDExOlB1bGxSZXF1ZXN0MzEwNDEyODg1","html_url":"https://github.com/security-force-monitor/sfm-cms/pull/606","diff_url":"https://github.com/security-force-monitor/sfm-cms/pull/606.diff","patch_url":"https://github.com/security-force-monitor/sfm-cms/pull/606.patch","issue_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues/606","number":606,"state":"open","locked":false,"title":"Implement delete views for top-level entities","user":{"login":"jeancochrane","id":14170650,"node_id":"MDQ6VXNlcjE0MTcwNjUw","avatar_url":"https://avatars3.githubusercontent.com/u/14170650?v=4","gravatar_id":"","url":"https://api.github.com/users/jeancochrane","html_url":"https://github.com/jeancochrane","followers_url":"https://api.github.com/users/jeancochrane/followers","following_url":"https://api.github.com/users/jeancochrane/following{/other_user}","gists_url":"https://api.github.com/users/jeancochrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jeancochrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeancochrane/subscriptions","organizations_url":"https://api.github.com/users/jeancochrane/orgs","repos_url":"https://api.github.com/users/jeancochrane/repos","events_url":"https://api.github.com/users/jeancochrane/events{/privacy}","received_events_url":"https://api.github.com/users/jeancochrane/received_events","type":"User","site_admin":false},"body":"## Overview\r\n\r\nThis PR implements delete views for top-level entities, including Persons, Organizations, Violations, and Locations. At this point, only \"hard deletes\" are allowed, meaning that a deleted entity is fully removed from the database. Because of this, deletion of top-level entities is prevented until the user removes all of its links to other entities, in order to prevent bugs like #508.\r\n\r\nConnects #508, #420.\r\n\r\n### Demo\r\n\r\nThe delete view for an incident:\r\n\r\n<img width=\"1125\" alt=\"Screen Shot 2019-08-23 at 9 15 37 AM\" src=\"https://user-images.githubusercontent.com/14170650/63599155-9d7cc480-c586-11e9-8c6d-809e5380090b.png\">\r\n\r\n## Testing Instructions\r\n\r\n## Unit tests\r\n\r\n* Confirm that new tests pass on Travis\r\n\r\n## Persons\r\n\r\n* Navigate to http://localhost:8000/en/person/create/ and create a new person (the only required field is `Name`)\r\n* Confirm the person is in the search index by searching for their name on http://localhost:8000/en/search/?entity_type=Person\r\n* Edit that person and add a posting to an organization (the only required field is `Organization`)\r\n* Navigate to the Edit Basics view for the person, scroll down to the bottom of the form, and select `Delete`\r\n* On the Delete page, confirm that you're shown the posting as a related entity, and that you can't delete the Person until you delete the posting\r\n* Click on the link for the posting, delete it, and then navigate back to the Person delete view and confirm you can delete the Person\r\n\r\n## Organizations, Violations, and Locations\r\n\r\n* Follow the same steps as you followed for Persons above for each of the other top-level entities\r\n\r\n","created_at":"2019-08-23T14:32:37Z","updated_at":"2019-08-23T14:32:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls/606/commits","review_comments_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls/606/comments","review_comment_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues/606/comments","statuses_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/statuses/68451746298911f38edabcd5c85053c31c33c3e4","head":{"label":"security-force-monitor:feature/jfc/delete-locations","ref":"feature/jfc/delete-locations","sha":"68451746298911f38edabcd5c85053c31c33c3e4","user":{"login":"security-force-monitor","id":19230973,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjMwOTcz","avatar_url":"https://avatars1.githubusercontent.com/u/19230973?v=4","gravatar_id":"","url":"https://api.github.com/users/security-force-monitor","html_url":"https://github.com/security-force-monitor","followers_url":"https://api.github.com/users/security-force-monitor/followers","following_url":"https://api.github.com/users/security-force-monitor/following{/other_user}","gists_url":"https://api.github.com/users/security-force-monitor/gists{/gist_id}","starred_url":"https://api.github.com/users/security-force-monitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/security-force-monitor/subscriptions","organizations_url":"https://api.github.com/users/security-force-monitor/orgs","repos_url":"https://api.github.com/users/security-force-monitor/repos","events_url":"https://api.github.com/users/security-force-monitor/events{/privacy}","received_events_url":"https://api.github.com/users/security-force-monitor/received_events","type":"Organization","site_admin":false},"repo":{"id":57247158,"node_id":"MDEwOlJlcG9zaXRvcnk1NzI0NzE1OA==","name":"sfm-cms","full_name":"security-force-monitor/sfm-cms","private":false,"owner":{"login":"security-force-monitor","id":19230973,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjMwOTcz","avatar_url":"https://avatars1.githubusercontent.com/u/19230973?v=4","gravatar_id":"","url":"https://api.github.com/users/security-force-monitor","html_url":"https://github.com/security-force-monitor","followers_url":"https://api.github.com/users/security-force-monitor/followers","following_url":"https://api.github.com/users/security-force-monitor/following{/other_user}","gists_url":"https://api.github.com/users/security-force-monitor/gists{/gist_id}","starred_url":"https://api.github.com/users/security-force-monitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/security-force-monitor/subscriptions","organizations_url":"https://api.github.com/users/security-force-monitor/orgs","repos_url":"https://api.github.com/users/security-force-monitor/repos","events_url":"https://api.github.com/users/security-force-monitor/events{/privacy}","received_events_url":"https://api.github.com/users/security-force-monitor/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/security-force-monitor/sfm-cms","description":"Platform for sharing complex information about security forces. Powers WhoWasInCommand.com","fork":true,"url":"https://api.github.com/repos/security-force-monitor/sfm-cms","forks_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/forks","keys_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/teams","hooks_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/hooks","issue_events_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues/events{/number}","events_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/events","assignees_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/assignees{/user}","branches_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/branches{/branch}","tags_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/tags","blobs_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/languages","stargazers_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/stargazers","contributors_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/contributors","subscribers_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/subscribers","subscription_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/subscription","commits_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/contents/{+path}","compare_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/merges","archive_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/downloads","issues_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues{/number}","pulls_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/labels{/name}","releases_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/releases{/id}","deployments_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/deployments","created_at":"2016-04-27T21:00:34Z","updated_at":"2019-08-20T20:05:48Z","pushed_at":"2019-08-23T14:04:27Z","git_url":"git://github.com/security-force-monitor/sfm-cms.git","ssh_url":"git@github.com:security-force-monitor/sfm-cms.git","clone_url":"https://github.com/security-force-monitor/sfm-cms.git","svn_url":"https://github.com/security-force-monitor/sfm-cms","homepage":"https://whowasincommand.com","size":70610,"stargazers_count":7,"watchers_count":7,"language":"TSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":161,"license":null,"forks":1,"open_issues":161,"watchers":7,"default_branch":"master"}},"base":{"label":"security-force-monitor:master","ref":"master","sha":"7dc9fa23c9da8dcdbadd4b4fe1a2de2efabbc4e4","user":{"login":"security-force-monitor","id":19230973,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjMwOTcz","avatar_url":"https://avatars1.githubusercontent.com/u/19230973?v=4","gravatar_id":"","url":"https://api.github.com/users/security-force-monitor","html_url":"https://github.com/security-force-monitor","followers_url":"https://api.github.com/users/security-force-monitor/followers","following_url":"https://api.github.com/users/security-force-monitor/following{/other_user}","gists_url":"https://api.github.com/users/security-force-monitor/gists{/gist_id}","starred_url":"https://api.github.com/users/security-force-monitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/security-force-monitor/subscriptions","organizations_url":"https://api.github.com/users/security-force-monitor/orgs","repos_url":"https://api.github.com/users/security-force-monitor/repos","events_url":"https://api.github.com/users/security-force-monitor/events{/privacy}","received_events_url":"https://api.github.com/users/security-force-monitor/received_events","type":"Organization","site_admin":false},"repo":{"id":57247158,"node_id":"MDEwOlJlcG9zaXRvcnk1NzI0NzE1OA==","name":"sfm-cms","full_name":"security-force-monitor/sfm-cms","private":false,"owner":{"login":"security-force-monitor","id":19230973,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5MjMwOTcz","avatar_url":"https://avatars1.githubusercontent.com/u/19230973?v=4","gravatar_id":"","url":"https://api.github.com/users/security-force-monitor","html_url":"https://github.com/security-force-monitor","followers_url":"https://api.github.com/users/security-force-monitor/followers","following_url":"https://api.github.com/users/security-force-monitor/following{/other_user}","gists_url":"https://api.github.com/users/security-force-monitor/gists{/gist_id}","starred_url":"https://api.github.com/users/security-force-monitor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/security-force-monitor/subscriptions","organizations_url":"https://api.github.com/users/security-force-monitor/orgs","repos_url":"https://api.github.com/users/security-force-monitor/repos","events_url":"https://api.github.com/users/security-force-monitor/events{/privacy}","received_events_url":"https://api.github.com/users/security-force-monitor/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/security-force-monitor/sfm-cms","description":"Platform for sharing complex information about security forces. Powers WhoWasInCommand.com","fork":true,"url":"https://api.github.com/repos/security-force-monitor/sfm-cms","forks_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/forks","keys_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/teams","hooks_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/hooks","issue_events_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues/events{/number}","events_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/events","assignees_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/assignees{/user}","branches_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/branches{/branch}","tags_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/tags","blobs_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/languages","stargazers_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/stargazers","contributors_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/contributors","subscribers_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/subscribers","subscription_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/subscription","commits_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/contents/{+path}","compare_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/merges","archive_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/downloads","issues_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues{/number}","pulls_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/labels{/name}","releases_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/releases{/id}","deployments_url":"https://api.github.com/repos/security-force-monitor/sfm-cms/deployments","created_at":"2016-04-27T21:00:34Z","updated_at":"2019-08-20T20:05:48Z","pushed_at":"2019-08-23T14:04:27Z","git_url":"git://github.com/security-force-monitor/sfm-cms.git","ssh_url":"git@github.com:security-force-monitor/sfm-cms.git","clone_url":"https://github.com/security-force-monitor/sfm-cms.git","svn_url":"https://github.com/security-force-monitor/sfm-cms","homepage":"https://whowasincommand.com","size":70610,"stargazers_count":7,"watchers_count":7,"language":"TSQL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":161,"license":null,"forks":1,"open_issues":161,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls/606"},"html":{"href":"https://github.com/security-force-monitor/sfm-cms/pull/606"},"issue":{"href":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues/606"},"comments":{"href":"https://api.github.com/repos/security-force-monitor/sfm-cms/issues/606/comments"},"review_comments":{"href":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls/606/comments"},"review_comment":{"href":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/security-force-monitor/sfm-cms/pulls/606/commits"},"statuses":{"href":"https://api.github.com/repos/security-force-monitor/sfm-cms/statuses/68451746298911f38edabcd5c85053c31c33c3e4"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":7,"additions":1003,"deletions":181,"changed_files":34}}
{"actor":{"display_login":"jeancochrane"}}