-
Notifications
You must be signed in to change notification settings - Fork 3
feat: soft delete #37
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
base: release-ulmo
Are you sure you want to change the base?
Conversation
049532d to
af5fe7c
Compare
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.
Pull request overview
This pull request implements soft delete functionality for the forum discussion system, allowing content to be marked as deleted without permanently removing it from the database.
Key Changes:
- Adds
is_deleted,deleted_at, anddeleted_byfields to track soft deletion metadata for threads and comments - Implements soft delete operations that set deletion flags instead of permanently removing content
- Adds restoration functionality to undelete previously soft-deleted content
- Includes new API endpoints for bulk restore operations and viewing deleted content
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| openedx/core/djangoapps/django_comment_common/comment_client/utils.py | Formatting changes, quote style standardization |
| openedx/core/djangoapps/django_comment_common/comment_client/thread.py | Adds soft delete/restore methods and deletion metadata fields to Thread model |
| openedx/core/djangoapps/django_comment_common/comment_client/models.py | Updates delete methods to support deleted_by parameter and improved error handling |
| openedx/core/djangoapps/django_comment_common/comment_client/comment.py | Adds soft delete/restore methods and deletion metadata fields to Comment model |
| lms/djangoapps/discussion/rest_api/views.py | Adds new API endpoints for restore operations and viewing deleted content |
| lms/djangoapps/discussion/rest_api/urls.py | Registers new API endpoint URLs for restore and deleted content operations |
| lms/djangoapps/discussion/rest_api/tasks.py | Updates bulk delete/restore tasks to track deleted_by metadata |
| lms/djangoapps/discussion/rest_api/serializers.py | Adds serialization for deletion metadata fields |
| lms/djangoapps/discussion/rest_api/forms.py | Adds show_deleted form field for filtering deleted content |
| lms/djangoapps/discussion/rest_api/tests/*.py | Updates test files with formatting changes and new deletion field expectations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
openedx/core/djangoapps/django_comment_common/comment_client/utils.py
Outdated
Show resolved
Hide resolved
openedx/core/djangoapps/django_comment_common/comment_client/thread.py
Outdated
Show resolved
Hide resolved
openedx/core/djangoapps/django_comment_common/comment_client/comment.py
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Implements soft delete functionality for discussion threads, responses, and comments using the
is_deletedflag instead of permanently deleting records.This enables safe deletion and restoration of discussion content while preserving existing data.
Changes Made
JIRA Tickets
Related Pull Requests