Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: inbox issue store update logic. (#4683)

Prateek Shouryaddfd953408c0
diff --git a/web/store/inbox/project-inbox.store.ts b/web/store/inbox/project-inbox.store.ts
index 830a58106d..2aecb17cbe 100644
--- a/web/store/inbox/project-inbox.store.ts
+++ b/web/store/inbox/project-inbox.store.ts
@@ -212,16 +212,15 @@ export class ProjectInboxStore implements IProjectInboxStore {
createOrUpdateInboxIssue = (inboxIssues: TInboxIssue[], workspaceSlug: string, projectId: string) => {
if (inboxIssues && inboxIssues.length > 0) {
inboxIssues.forEach((inbox: TInboxIssue) => {
- const inboxIssueDetail = this.getIssueInboxByIssueId(inbox?.issue?.id);
- if (inboxIssueDetail)
- update(this.inboxIssues, [inbox?.issue?.id], (existingInboxIssue) => ({
- ...existingInboxIssue,
+ const existingInboxIssueDetail = this.getIssueInboxByIssueId(inbox?.issue?.id);
+ if (existingInboxIssueDetail)
+ Object.assign(existingInboxIssueDetail, {
...inbox,
issue: {
- ...existingInboxIssue?.issue,
- ...inbox?.issue,
+ ...existingInboxIssueDetail.issue,
+ ...inbox.issue,
},
- }));
+ });
else
set(this.inboxIssues, [inbox?.issue?.id], new InboxIssueStore(workspaceSlug, projectId, inbox, this.store));
});