-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[WEB-2697] chore: draft issue listing #5874
Conversation
WalkthroughThe changes in this pull request primarily involve modifications to the cycle management API endpoints, specifically focusing on implementing soft deletion for cycles and enhancing the logic for transferring cycle issues. The Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- apiserver/plane/api/views/cycle.py (1 hunks)
- apiserver/plane/app/views/cycle/base.py (1 hunks)
- apiserver/plane/app/views/workspace/draft.py (1 hunks)
🧰 Additional context used
🔇 Additional comments (2)
apiserver/plane/app/views/workspace/draft.py (1)
63-64
: LGTM! Cycle ID annotation updated for draft issues.The change in the
cycle_id
annotation logic looks good. It now correctly referencesdraft_issue_cycle
instead ofissue_cycle
, which aligns with the context of draft issues. This modification supports the implementation of soft deletion for cycles, ensuring that thecycle_id
is only assigned when the associated cycle is not marked as deleted.apiserver/plane/api/views/cycle.py (1)
407-407
:⚠️ Potential issueVerify the usage of the
soft
parameter incycle.delete(soft=False)
The call to
cycle.delete(soft=False)
may result in a hard delete of thecycle
object since thesoft
parameter is set toFalse
. If the intention is to perform a soft delete, which typically marks the object as deleted without removing it from the database, please verify that settingsoft=False
aligns with the desired delete behavior according to thedelete
method implementation in theCycle
model.Run the following script to check the default value and usage of the
soft
parameter in thedelete
method of theCycle
model:
# TODO: Soft delete the cycle break the onetoone relationship with cycle issue | ||
cycle.delete(soft=False) |
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.
Implement soft deletion for cycles
Currently, the destroy
method performs a hard delete with cycle.delete(soft=False)
, which contradicts the PR's objective to implement soft deletion for cycles. The TODO comment indicates that soft deleting the cycle breaks the one-to-one relationship with CycleIssue
. Addressing this issue will allow cycles to be soft-deleted as intended, maintaining data integrity and consistency.
Would you like assistance in resolving the relationship issue to enable soft deletion? I can help modify the deletion logic to preserve associations while soft deleting the cycle.
chore:
Issue Link: WEB-2697
Summary by CodeRabbit
New Features
cycle_view
parameter.Bug Fixes
Documentation
These changes enhance the overall robustness and functionality of cycle management within the application.