[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.
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_idannotation logic looks good. It now correctly referencesdraft_issue_cycleinstead ofissue_cycle, which aligns with the context of draft issues. This modification supports the implementation of soft deletion for cycles, ensuring that thecycle_idis 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
softparameter incycle.delete(soft=False)The call to
cycle.delete(soft=False)may result in a hard delete of thecycleobject since thesoftparameter 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=Falsealigns with the desired delete behavior according to thedeletemethod implementation in theCyclemodel.Run the following script to check the default value and usage of the
softparameter in thedeletemethod of theCyclemodel:
| # TODO: Soft delete the cycle break the onetoone relationship with cycle issue | ||
| cycle.delete(soft=False) |
There was a problem hiding this comment.
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_viewparameter.Bug Fixes
Documentation
These changes enhance the overall robustness and functionality of cycle management within the application.