-
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-2676 ] fix: workspace draft move to project #5834
Conversation
WalkthroughThe changes in this pull request focus on the Changes
Possibly related PRs
Suggested reviewers
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: 0
🧹 Outside diff range and nitpick comments (1)
web/core/components/issues/issue-modal/form.tsx (1)
435-442
: Approved: Ensures latest form data is included when moving issuesThe changes effectively address the issue of user updates not being saved during the transition from draft to project. By merging
data
withgetValues()
, we ensure that all the latest form data is included when moving the issue.For improved clarity and maintainability, consider extracting the merged data into a separate variable:
onClick={() => { if (data?.id && data) { + const mergedData = { + ...data, + ...getValues(), + }; moveIssue(workspaceSlug.toString(), data?.id, { - ...data, - ...getValues(), + ...mergedData, } as TWorkspaceDraftIssue); } }}This change would make the code more readable and easier to maintain, especially if additional operations on the merged data are needed in the future.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- web/core/components/issues/issue-modal/form.tsx (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
web/core/components/issues/issue-modal/form.tsx (1)
Line range hint
1-442
: Overall impact: Focused change with minimal riskThe modification to the "Add to project" button's onClick handler is well-contained and addresses the specific issue mentioned in the PR objectives. The change is minimal, focused, and doesn't introduce any unexpected side effects to the overall component structure or logic.
This approach of making a targeted change reduces the risk of introducing new bugs while effectively solving the problem of preserving user updates during the transition from draft to project.
Changes:
This PR includes a fix for the "Move to project" action in the workspace draft. Previously, when an issue was moved from a draft to a project, any updates made by the user during the transition were not being saved. I've implemented the necessary changes to ensure that updates are now properly applied
Reference:
[WEB-2676]
Summary by CodeRabbit
New Features
Bug Fixes