-
-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for Case Deletion #33831
Open
minhaminha
wants to merge
48
commits into
master
Choose a base branch
from
ml/case-deletion
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,600
−38
Open
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
3570ec2
Add support for deleting individual cases (dry run only)
minhaminha 580b5a1
Modify UI based on feedback (list structure, extra deletion confirmat…
minhaminha 556d299
More UI changes based on feedback (list reorganization, using list-gr…
minhaminha 5f1c4c4
Reconstruct form name if xmlns_to_name returns the xmlns
minhaminha 707da7d
Add support for deleting cases and forms (no more dry run) + add tests
minhaminha 8847642
Add line in task to delete old enough soft deleted cases + change wai…
minhaminha 52b9443
Merge branch 'master' into ml/case-deletion
minhaminha 870f8ca
add es_test decorator
minhaminha f78631c
Make small changes based on PR feedback
minhaminha d96c8a9
Refactor get_cases_and_forms_for_deletion in 3 separate functions + a…
minhaminha 4e36269
Use attrs classes instead of complex dictionaries to pass around disp…
minhaminha 3481e4f
Further break down get_case_and_display_data
minhaminha 588b377
Disable hard deletion of eligible data
minhaminha e91c974
Undo delete task changes
minhaminha 53852ac
Integrate case deletion into form deletion if the form had created an…
minhaminha f40be4b
Add more tests for form deletion, new case deletion util functions
minhaminha 3c00173
Various refactors based on PR feedback
minhaminha fe480b3
Refactor tests + add more tests
minhaminha 0f5e737
Refactor main case walk function into two smaller class methods, upda…
minhaminha 2ee8572
Remove case hard deletion method (in favor of eventual tombstoning me…
minhaminha 52c42bb
Merge branch 'master' into ml/case-deletion
minhaminha 98dd353
small nit changes
minhaminha 86f5deb
Make walk_through_case_forms always returns a dict
minhaminha 18fd6ba
Add in memory caching for forms and case blocks
minhaminha 9c65a10
Make sure forms are actually cached in TempFormCache, remove domain a…
minhaminha 83872d4
Text changes + fix escaping issue
minhaminha 76c6760
Merge branch 'master' into ml/case-deletion
minhaminha e5b25f8
Make small changes (remove manual escaping, add more tests about the …
minhaminha 09ad4ff
Add TempCaseCache and tests, add cleanup to tests that create forms a…
minhaminha b93a8cb
Simplify test to save only once
minhaminha cf79b54
Merge branch 'master' into ml/case-deletion
minhaminha d3197eb
Fix bug caused by returned form list if there is no create form
minhaminha 53f3877
Fix bug that raises a 404 when getting apps without an app_id
minhaminha 1e49ef8
Minor text and code change suggestions
minhaminha e1fc391
Fix 404 raising bug when trying to fetch deleted forms + small refact…
minhaminha e5a2f9b
Fix bug that prevents bulk imports from able to delete
minhaminha 9538140
Fix form order for large deletions
minhaminha 55d63a3
Make form and case soft deletion all or nothing + prevent same forms …
minhaminha 37d3f06
Minor fix
minhaminha 23f27df
Small typo fix
minhaminha 2565d07
Small typo fix part 2
minhaminha 3a9d827
Reverse sorted list so latest form is archived first
minhaminha 04bdb7b
Add test covering bulk form archive error handling
minhaminha 1b1b86d
Typo fix in success message
minhaminha 1b4b297
Make soft_delete_cases_and_forms a celery task (needs more work)
minhaminha c9b879e
Merge branch 'master' into ml/case-deletion
minhaminha b062be8
Merge branch 'master' into ml/case-deletion
gherceg bfa16b7
Merge branch 'master' into ml/case-deletion
minhaminha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What causes the error here? And how does this test ensure that the error is not encountered first, before any of the other forms are archived?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in making the multiple cases/forms in
make_complex_case
, the last form updates a particular child case while the second form creates it. Since on the first error it'll sort it in reversereceived_on
order, it'll at least archive the the third form before throwing an error saying it can't archive the second form, since the fourth form wasn't archived/part of the delete_form_list.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a comment to that test to explain how it works.