{"action":"created","issue":{"url":"https://api.github.com/repos/medic/medic-webapp/issues/2038","repository_url":"https://api.github.com/repos/medic/medic-webapp","labels_url":"https://api.github.com/repos/medic/medic-webapp/issues/2038/labels{/name}","comments_url":"https://api.github.com/repos/medic/medic-webapp/issues/2038/comments","events_url":"https://api.github.com/repos/medic/medic-webapp/issues/2038/events","html_url":"https://github.com/medic/medic-webapp/issues/2038","id":139141544,"number":2038,"title":"Create and document a procedure for clearing test data","user":{"login":"browndav","id":763977,"avatar_url":"https://avatars.githubusercontent.com/u/763977?v=3","gravatar_id":"","url":"https://api.github.com/users/browndav","html_url":"https://github.com/browndav","followers_url":"https://api.github.com/users/browndav/followers","following_url":"https://api.github.com/users/browndav/following{/other_user}","gists_url":"https://api.github.com/users/browndav/gists{/gist_id}","starred_url":"https://api.github.com/users/browndav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/browndav/subscriptions","organizations_url":"https://api.github.com/users/browndav/orgs","repos_url":"https://api.github.com/users/browndav/repos","events_url":"https://api.github.com/users/browndav/events{/privacy}","received_events_url":"https://api.github.com/users/browndav/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/medic/medic-webapp/labels/1%20-%20Scheduled","name":"1 - Scheduled","color":"bfd4d2"},{"url":"https://api.github.com/repos/medic/medic-webapp/labels/Feature%20Request","name":"Feature Request","color":"6fc5af"},{"url":"https://api.github.com/repos/medic/medic-webapp/labels/v0.6","name":"v0.6","color":"7193EE"}],"state":"open","locked":false,"assignee":{"login":"estellecomment","id":911434,"avatar_url":"https://avatars.githubusercontent.com/u/911434?v=3","gravatar_id":"","url":"https://api.github.com/users/estellecomment","html_url":"https://github.com/estellecomment","followers_url":"https://api.github.com/users/estellecomment/followers","following_url":"https://api.github.com/users/estellecomment/following{/other_user}","gists_url":"https://api.github.com/users/estellecomment/gists{/gist_id}","starred_url":"https://api.github.com/users/estellecomment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estellecomment/subscriptions","organizations_url":"https://api.github.com/users/estellecomment/orgs","repos_url":"https://api.github.com/users/estellecomment/repos","events_url":"https://api.github.com/users/estellecomment/events{/privacy}","received_events_url":"https://api.github.com/users/estellecomment/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/medic/medic-webapp/milestones/49","html_url":"https://github.com/medic/medic-webapp/milestones/April%204th%20-%20April%2018th:%20Frozen%20(Let%20It%20Go)","labels_url":"https://api.github.com/repos/medic/medic-webapp/milestones/49/labels","id":1682803,"number":49,"title":"April 4th - April 18th: Frozen (Let It Go)","description":"","creator":{"login":"browndav","id":763977,"avatar_url":"https://avatars.githubusercontent.com/u/763977?v=3","gravatar_id":"","url":"https://api.github.com/users/browndav","html_url":"https://github.com/browndav","followers_url":"https://api.github.com/users/browndav/followers","following_url":"https://api.github.com/users/browndav/following{/other_user}","gists_url":"https://api.github.com/users/browndav/gists{/gist_id}","starred_url":"https://api.github.com/users/browndav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/browndav/subscriptions","organizations_url":"https://api.github.com/users/browndav/orgs","repos_url":"https://api.github.com/users/browndav/repos","events_url":"https://api.github.com/users/browndav/events{/privacy}","received_events_url":"https://api.github.com/users/browndav/received_events","type":"User","site_admin":false},"open_issues":28,"closed_issues":12,"state":"open","created_at":"2016-04-04T19:01:00Z","updated_at":"2016-04-07T03:00:01Z","due_on":"2016-04-18T07:00:00Z","closed_at":null},"comments":8,"created_at":"2016-03-08T00:58:17Z","updated_at":"2016-04-07T08:35:00Z","closed_at":null,"body":"We need a procedure for clearing out test/example data before a branch transitions from testing to production. This procedure will need to accommodate rolling releases to multiple branches on the same instance, and will likely need to at least be able to restrict its scope to a user and a up-to-and-including date. The procedure should clear all CHP-creatable entities: contacts, facilities, reports, and messages.\r\n\r\nTo do:\r\n- [x] Verify with LG that some combination of user scoping and date scoping is granular enough.\r\n- [ ] Document the procedure in the form of a human-readable checklist\r\n- [ ] Test the checklist steps using a copy of the current production instance, and verify that all items are cleared.\r\n- [ ] Ensure no regressions are seen after the mass-deletion\r\n- [ ] Ensure mass-deletions replicate correctly to mobile devices"},"comment":{"url":"https://api.github.com/repos/medic/medic-webapp/issues/comments/206759994","html_url":"https://github.com/medic/medic-webapp/issues/2038#issuecomment-206759994","issue_url":"https://api.github.com/repos/medic/medic-webapp/issues/2038","id":206759994,"user":{"login":"estellecomment","id":911434,"avatar_url":"https://avatars.githubusercontent.com/u/911434?v=3","gravatar_id":"","url":"https://api.github.com/users/estellecomment","html_url":"https://github.com/estellecomment","followers_url":"https://api.github.com/users/estellecomment/followers","following_url":"https://api.github.com/users/estellecomment/following{/other_user}","gists_url":"https://api.github.com/users/estellecomment/gists{/gist_id}","starred_url":"https://api.github.com/users/estellecomment/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estellecomment/subscriptions","organizations_url":"https://api.github.com/users/estellecomment/orgs","repos_url":"https://api.github.com/users/estellecomment/repos","events_url":"https://api.github.com/users/estellecomment/events{/privacy}","received_events_url":"https://api.github.com/users/estellecomment/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T08:35:00Z","updated_at":"2016-04-07T08:35:00Z","body":"Assumptions : \r\n - Training data is restricted to a given branch (‘district_hospital’ type), and to a time span (start and end timestamp)\r\n - Branch contains CHP areas (‘health_center’ types). CHP areas were created ahead of time, and won’t be deleted by this process.\r\n\r\nDeletion plan : \r\n - CHPs can create families (‘clinic’ type). All families created within the training period, in the branch in training, will be deleted.\r\n - CHPs can add members to families (‘person’ type). All members created within the training period, in the branch in training, will be deleted.\r\n - CHPs can fill in reports. Any report filed by anyone of the branch (CHP, branch admin) within the training period will be deleted.\r\n - CHPs can send messages. Any message sent by anyone of the branch (CHP, branch admin) within the training period will be deleted.\r\n\r\nNote : that means if any “real” CHP areas or families or family members were created during that time, or any “real” reports or messages sent, they will be deleted. Can LG make sure this won’t happen? (@sglangevin)\r\nIf they can’t, we can restrict deletions to a given set of CHP areas. In this case, is the trainer also creating data? Is that trainer a CHP in the app, or a different type?\r\n"}}