[WEB-2367] fix: completed cycle issue transfer#5494
Conversation
WalkthroughThe changes involve modifications to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CycleLayoutRoot
participant TransferIssues
User->>CycleLayoutRoot: Request to view cycle
CycleLayoutRoot->>CycleLayoutRoot: Determine transferable issues
CycleLayoutRoot->>TransferIssues: Pass canTransferIssues
TransferIssues->>User: Display transfer button based on canTransferIssues
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: 0
Outside diff range, codebase verification and nitpick comments (1)
web/core/components/cycles/transfer-issues.tsx (1)
4-4: Remove the unnecessary comment.The comment
// uidoesn't provide any useful information and can be removed.Apply this diff to remove the comment:
-// ui
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- web/core/components/cycles/transfer-issues.tsx (1 hunks)
- web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx (2 hunks)
Additional comments not posted (4)
web/core/components/cycles/transfer-issues.tsx (2)
9-9: LGTM!The new
canTransferIssuesprop simplifies the component's logic and removes the dependency on fetched data. The change is consistent with the PR summary and the AI-generated summary.
14-22: LGTM!The change simplifies the component's logic by removing the dependency on fetched data and relying on the
canTransferIssuesprop to determine the button's visibility. The change is consistent with the PR summary and the AI-generated summary.web/core/components/issues/issue-layouts/roots/cycle-layout-root.tsx (2)
70-74: LGTM!The code changes introduce the necessary logic to determine the transferability of issues based on the cycle's progress snapshot and the count of transferable issues. The use of the
isEmptyfunction from thelodashlibrary is appropriate for checking if theprogress_snapshotis empty, and the calculation oftransferableIssuesCountcorrectly sums up the relevant issue counts.
85-85: LGTM!Passing the
canTransferIssuesprop to theTransferIssuescomponent is a good way to conditionally enable or disable the transfer functionality based on the calculated state. This enhances the component's interactivity and ensures that the transfer button reflects the current state of the cycle's issues more accurately.
Changes:
This PR fixes a bug related to issue transfer after cycle completion. The transfer issue button wasn't rendering correctly due to a recent change in the response.
Reference:
[WEB-2367]
Summary by CodeRabbit
New Features
TransferIssuescomponent to conditionally display the transfer button based on thecanTransferIssuesproperty.CycleLayoutRootcomponent to determine the transferability of issues based on the cycle's progress and available transferable issues.Bug Fixes