[WEB-2121] fix: project issue creation#5266
Conversation
WalkthroughThe recent changes enhance the issue creation functionality within the project management system. Key updates include parameter renaming for clarity and the addition of new optional parameters to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ProjectActions as Project Actions
participant IssueStore as Issue Store
User->>ProjectActions: createIssue(workspaceSlug, issueProjectId, data)
ProjectActions->>IssueStore: addIssue(data) if shouldUpdateList
alt shouldUpdateList is true
IssueStore-->>ProjectActions: Issue added successfully
ProjectActions->>IssueStore: fetchParentStats()
else shouldUpdateList is false
ProjectActions-->>User: Issue created, no updates made
end
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- web/core/hooks/use-issues-actions.tsx (1 hunks)
- web/core/store/issue/helpers/base-issues.store.ts (1 hunks)
- web/core/store/issue/project/issue.store.ts (2 hunks)
Additional comments not posted (4)
web/core/store/issue/project/issue.store.ts (2)
1-10: Reformatting imports for consistencyThe import statements have been reformatted for consistency and clarity. This change does not affect the logic or functionality of the code.
39-45: Enhancement: UpdatedcreateIssuemethod signatureThe
createIssuemethod's signature has been expanded to include two additional optional parameters:idandshouldUpdateList. This change enhances the method's functionality by allowing the caller to specify whether to update the issue list after creating a new issue, thereby improving the flexibility of the API.web/core/hooks/use-issues-actions.tsx (1)
94-96: Parameter renaming and logic enhancementThe parameter
projectIdhas been renamed toissueProjectIdfor clarity. Additionally, a new boolean argument has been added to theissues.createIssuemethod call. This argument evaluates whetherissueProjectIdis equal toprojectId, which likely influences the behavior of thecreateIssuefunction in specific scenarios.web/core/store/issue/helpers/base-issues.store.ts (1)
523-525: Conditional logic foraddIssueandfetchParentStatsThe
addIssueandfetchParentStatsmethods are now called based on theshouldUpdateListflag. This change improves the control flow by preventing unnecessary method calls whenshouldUpdateListis false.
|
Isn't this issue coming from adding the issue to the current project store irrespective of project id? |
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- web/core/store/issue/project/issue.store.ts (4 hunks)
Files skipped from review as they are similar to previous changes (1)
- web/core/store/issue/project/issue.store.ts
Summary
On adding a new issue to a project different from the current project, the issue was getting reflected in the wrong project.
[WEB-2121]
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
Documentation