{"action":"created","comment":{"url":"https://api.github.com/repos/medic/medic-webapp/pulls/comments/169244649","pull_request_review_id":97737421,"id":169244649,"diff_hunk":"@@ -75,22 +108,33 @@ var _ = require('underscore');\n         docs.forEach(function(doc) {\n           doc._deleted = true;\n         });\n+        var parents = [];\n         return $q.all(docs.map(function(doc) {","path":"static/js/services/delete-docs.js","position":67,"original_position":67,"commit_id":"12bc2a549e2791e3f9ebf6fe2cbe32fd4e9fecce","original_commit_id":"12bc2a549e2791e3f9ebf6fe2cbe32fd4e9fecce","user":{"login":"SCdF","id":583851,"avatar_url":"https://avatars0.githubusercontent.com/u/583851?v=4","gravatar_id":"","url":"https://api.github.com/users/SCdF","html_url":"https://github.com/SCdF","followers_url":"https://api.github.com/users/SCdF/followers","following_url":"https://api.github.com/users/SCdF/following{/other_user}","gists_url":"https://api.github.com/users/SCdF/gists{/gist_id}","starred_url":"https://api.github.com/users/SCdF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SCdF/subscriptions","organizations_url":"https://api.github.com/users/SCdF/orgs","repos_url":"https://api.github.com/users/SCdF/repos","events_url":"https://api.github.com/users/SCdF/events{/privacy}","received_events_url":"https://api.github.com/users/SCdF/received_events","type":"User","site_admin":false},"body":"Oh sorry you're right, ignore me!","created_at":"2018-02-20T08:28:17Z","updated_at":"2018-02-20T08:28:17Z","html_url":"https://github.com/medic/medic-webapp/pull/4202#discussion_r169244649","pull_request_url":"https://api.github.com/repos/medic/medic-webapp/pulls/4202","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/comments/169244649"},"html":{"href":"https://github.com/medic/medic-webapp/pull/4202#discussion_r169244649"},"pull_request":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/4202"}},"in_reply_to_id":169132757},"pull_request":{"url":"https://api.github.com/repos/medic/medic-webapp/pulls/4202","id":169408619,"html_url":"https://github.com/medic/medic-webapp/pull/4202","diff_url":"https://github.com/medic/medic-webapp/pull/4202.diff","patch_url":"https://github.com/medic/medic-webapp/pull/4202.patch","issue_url":"https://api.github.com/repos/medic/medic-webapp/issues/4202","number":4202,"state":"open","locked":false,"title":"New bulk delete endpoint","user":{"login":"rmhowe","id":9385231,"avatar_url":"https://avatars2.githubusercontent.com/u/9385231?v=4","gravatar_id":"","url":"https://api.github.com/users/rmhowe","html_url":"https://github.com/rmhowe","followers_url":"https://api.github.com/users/rmhowe/followers","following_url":"https://api.github.com/users/rmhowe/following{/other_user}","gists_url":"https://api.github.com/users/rmhowe/gists{/gist_id}","starred_url":"https://api.github.com/users/rmhowe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmhowe/subscriptions","organizations_url":"https://api.github.com/users/rmhowe/orgs","repos_url":"https://api.github.com/users/rmhowe/repos","events_url":"https://api.github.com/users/rmhowe/events{/privacy}","received_events_url":"https://api.github.com/users/rmhowe/received_events","type":"User","site_admin":false},"body":"# Description\r\n\r\nFor admins and full access users, when bulk deleting a large number of docs (currently capped at 500) the request would time out. The decided solution was to add a new dedicated bulk delete endpoint to be used by the UI for admins and full access users, and also by tech leads. The new endpoint batches docs in groups of 100 and sends a chunked response with a chunk corresponding to each batch. These batches are read by the UI in order to display progress to the user.\r\n\r\nmedic/medic-webapp#4113\r\n\r\n# Review checklist\r\n\r\n- [ ] Readable: Concise, well named, follows the [style guide](https://github.com/medic/medic-docs/blob/master/development/style-guide.md), documented if necessary.\r\n- [ ] Documented: Announced in Changes.md in plain English. Configuration and user documentation on [medic-docs](https://github.com/medic/medic-docs/)\r\n- [ ] Tested: Unit and/or e2e where appropriate\r\n- [ ] Internationalised: All user facing text\r\n- [ ] Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in Changes.md.","created_at":"2018-02-15T15:50:00Z","updated_at":"2018-02-20T08:28:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d404cd9980ed02e2331766112dcbec54336b1f26","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/medic/medic-webapp/pulls/4202/commits","review_comments_url":"https://api.github.com/repos/medic/medic-webapp/pulls/4202/comments","review_comment_url":"https://api.github.com/repos/medic/medic-webapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/medic/medic-webapp/issues/4202/comments","statuses_url":"https://api.github.com/repos/medic/medic-webapp/statuses/12bc2a549e2791e3f9ebf6fe2cbe32fd4e9fecce","head":{"label":"medic:4113-bulk-delete-often-fails","ref":"4113-bulk-delete-often-fails","sha":"12bc2a549e2791e3f9ebf6fe2cbe32fd4e9fecce","user":{"login":"medic","id":474424,"avatar_url":"https://avatars2.githubusercontent.com/u/474424?v=4","gravatar_id":"","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"repo":{"id":2698821,"name":"medic-webapp","full_name":"medic/medic-webapp","owner":{"login":"medic","id":474424,"avatar_url":"https://avatars2.githubusercontent.com/u/474424?v=4","gravatar_id":"","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/medic/medic-webapp","description":"Medic Mobile combines SMS messaging, data collection, and analytics for health workers and health systems in hard-to-reach areas with or without internet connectivity.","fork":false,"url":"https://api.github.com/repos/medic/medic-webapp","forks_url":"https://api.github.com/repos/medic/medic-webapp/forks","keys_url":"https://api.github.com/repos/medic/medic-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/medic/medic-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/medic/medic-webapp/teams","hooks_url":"https://api.github.com/repos/medic/medic-webapp/hooks","issue_events_url":"https://api.github.com/repos/medic/medic-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/medic/medic-webapp/events","assignees_url":"https://api.github.com/repos/medic/medic-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/medic/medic-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/medic/medic-webapp/tags","blobs_url":"https://api.github.com/repos/medic/medic-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/medic/medic-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/medic/medic-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/medic/medic-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/medic/medic-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/medic/medic-webapp/languages","stargazers_url":"https://api.github.com/repos/medic/medic-webapp/stargazers","contributors_url":"https://api.github.com/repos/medic/medic-webapp/contributors","subscribers_url":"https://api.github.com/repos/medic/medic-webapp/subscribers","subscription_url":"https://api.github.com/repos/medic/medic-webapp/subscription","commits_url":"https://api.github.com/repos/medic/medic-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/medic/medic-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/medic/medic-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/medic/medic-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/medic/medic-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/medic/medic-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/medic/medic-webapp/merges","archive_url":"https://api.github.com/repos/medic/medic-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/medic/medic-webapp/downloads","issues_url":"https://api.github.com/repos/medic/medic-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/medic/medic-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/medic/medic-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/medic/medic-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/medic/medic-webapp/labels{/name}","releases_url":"https://api.github.com/repos/medic/medic-webapp/releases{/id}","deployments_url":"https://api.github.com/repos/medic/medic-webapp/deployments","created_at":"2011-11-02T23:19:55Z","updated_at":"2018-02-13T23:40:10Z","pushed_at":"2018-02-19T16:08:39Z","git_url":"git://github.com/medic/medic-webapp.git","ssh_url":"git@github.com:medic/medic-webapp.git","clone_url":"https://github.com/medic/medic-webapp.git","svn_url":"https://github.com/medic/medic-webapp","homepage":"http://medicmobile.org/tools","size":39775,"stargazers_count":93,"watchers_count":93,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"open_issues_count":351,"license":null,"forks":47,"open_issues":351,"watchers":93,"default_branch":"master"}},"base":{"label":"medic:master","ref":"master","sha":"037dc9497497cebcc7bbbbd4b4d165c342d5a110","user":{"login":"medic","id":474424,"avatar_url":"https://avatars2.githubusercontent.com/u/474424?v=4","gravatar_id":"","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"repo":{"id":2698821,"name":"medic-webapp","full_name":"medic/medic-webapp","owner":{"login":"medic","id":474424,"avatar_url":"https://avatars2.githubusercontent.com/u/474424?v=4","gravatar_id":"","url":"https://api.github.com/users/medic","html_url":"https://github.com/medic","followers_url":"https://api.github.com/users/medic/followers","following_url":"https://api.github.com/users/medic/following{/other_user}","gists_url":"https://api.github.com/users/medic/gists{/gist_id}","starred_url":"https://api.github.com/users/medic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medic/subscriptions","organizations_url":"https://api.github.com/users/medic/orgs","repos_url":"https://api.github.com/users/medic/repos","events_url":"https://api.github.com/users/medic/events{/privacy}","received_events_url":"https://api.github.com/users/medic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/medic/medic-webapp","description":"Medic Mobile combines SMS messaging, data collection, and analytics for health workers and health systems in hard-to-reach areas with or without internet connectivity.","fork":false,"url":"https://api.github.com/repos/medic/medic-webapp","forks_url":"https://api.github.com/repos/medic/medic-webapp/forks","keys_url":"https://api.github.com/repos/medic/medic-webapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/medic/medic-webapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/medic/medic-webapp/teams","hooks_url":"https://api.github.com/repos/medic/medic-webapp/hooks","issue_events_url":"https://api.github.com/repos/medic/medic-webapp/issues/events{/number}","events_url":"https://api.github.com/repos/medic/medic-webapp/events","assignees_url":"https://api.github.com/repos/medic/medic-webapp/assignees{/user}","branches_url":"https://api.github.com/repos/medic/medic-webapp/branches{/branch}","tags_url":"https://api.github.com/repos/medic/medic-webapp/tags","blobs_url":"https://api.github.com/repos/medic/medic-webapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/medic/medic-webapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/medic/medic-webapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/medic/medic-webapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/medic/medic-webapp/statuses/{sha}","languages_url":"https://api.github.com/repos/medic/medic-webapp/languages","stargazers_url":"https://api.github.com/repos/medic/medic-webapp/stargazers","contributors_url":"https://api.github.com/repos/medic/medic-webapp/contributors","subscribers_url":"https://api.github.com/repos/medic/medic-webapp/subscribers","subscription_url":"https://api.github.com/repos/medic/medic-webapp/subscription","commits_url":"https://api.github.com/repos/medic/medic-webapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/medic/medic-webapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/medic/medic-webapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/medic/medic-webapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/medic/medic-webapp/contents/{+path}","compare_url":"https://api.github.com/repos/medic/medic-webapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/medic/medic-webapp/merges","archive_url":"https://api.github.com/repos/medic/medic-webapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/medic/medic-webapp/downloads","issues_url":"https://api.github.com/repos/medic/medic-webapp/issues{/number}","pulls_url":"https://api.github.com/repos/medic/medic-webapp/pulls{/number}","milestones_url":"https://api.github.com/repos/medic/medic-webapp/milestones{/number}","notifications_url":"https://api.github.com/repos/medic/medic-webapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/medic/medic-webapp/labels{/name}","releases_url":"https://api.github.com/repos/medic/medic-webapp/releases{/id}","deployments_url":"https://api.github.com/repos/medic/medic-webapp/deployments","created_at":"2011-11-02T23:19:55Z","updated_at":"2018-02-13T23:40:10Z","pushed_at":"2018-02-19T16:08:39Z","git_url":"git://github.com/medic/medic-webapp.git","ssh_url":"git@github.com:medic/medic-webapp.git","clone_url":"https://github.com/medic/medic-webapp.git","svn_url":"https://github.com/medic/medic-webapp","homepage":"http://medicmobile.org/tools","size":39775,"stargazers_count":93,"watchers_count":93,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"open_issues_count":351,"license":null,"forks":47,"open_issues":351,"watchers":93,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/4202"},"html":{"href":"https://github.com/medic/medic-webapp/pull/4202"},"issue":{"href":"https://api.github.com/repos/medic/medic-webapp/issues/4202"},"comments":{"href":"https://api.github.com/repos/medic/medic-webapp/issues/4202/comments"},"review_comments":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/4202/comments"},"review_comment":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/medic/medic-webapp/pulls/4202/commits"},"statuses":{"href":"https://api.github.com/repos/medic/medic-webapp/statuses/12bc2a549e2791e3f9ebf6fe2cbe32fd4e9fecce"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"SCdF"}}