π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-2896] fix: mutation problem with issue properties while accepting an intake issue. (#6277)
Prateek Shouryaa5c1282e5213
diff --git a/web/core/local-db/utils/utils.ts b/web/core/local-db/utils/utils.tsindex b0330e057a..4f5f0befb8 100644--- a/web/core/local-db/utils/utils.ts+++ b/web/core/local-db/utils/utils.ts@@ -64,9 +64,10 @@ export const updatePersistentLayer = async (issueIds: string | string[]) => {issueIds.forEach(async (issueId) => {const dbIssue = await persistence.getIssue(issueId);const issue = rootStore.issue.issues.getIssueById(issueId);+ const updatedIssue = dbIssue ? { ...dbIssue, ...issue } : issue;- if (issue) {- addIssueToPersistanceLayer(issue);+ if (updatedIssue) {+ addIssueToPersistanceLayer(updatedIssue);}});};diff --git a/web/core/store/inbox/inbox-issue.store.ts b/web/core/store/inbox/inbox-issue.store.tsindex 74e6534d67..31bb5f591a 100644--- a/web/core/store/inbox/inbox-issue.store.ts+++ b/web/core/store/inbox/inbox-issue.store.ts@@ -98,7 +98,9 @@ export class InboxIssueStore implements IInboxIssueStore {// If issue accepted sync issue to local dbif (status === EInboxIssueStatus.ACCEPTED) {- addIssueToPersistanceLayer({ ...this.issue, ...inboxIssue.issue });+ const updatedIssue = { ...this.issue, ...inboxIssue.issue };+ this.store.issue.issues.addIssue([updatedIssue]);+ await addIssueToPersistanceLayer(updatedIssue);}} catch {runInAction(() => set(this, "status", previousData.status));