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.

[WEB-1642] chore: mutating issue estimation_point when we delete the estimate point from the project (#4862)

guru_sainath0b4faf7db2e4
diff --git a/web/core/store/estimates/estimate.ts b/web/core/store/estimates/estimate.ts
index 1c7693363b..a37176b846 100644
--- a/web/core/store/estimates/estimate.ts
+++ b/web/core/store/estimates/estimate.ts
@@ -273,10 +273,19 @@ export class Estimate implements IEstimate {
newEstimatePointId ? { new_estimate_id: newEstimatePointId } : undefined
);
+ const currentIssues = Object.values(this.store.issue.issues.issuesMap || {});
+ if (currentIssues) {
+ currentIssues.map((issue) => {
+ if (issue.estimate_point === estimatePointId) {
+ this.store.issue.issues.updateIssue(issue.id, { estimate_point: newEstimatePointId });
+ }
+ });
+ }
+
runInAction(() => {
unset(this.estimatePoints, [estimatePointId]);
});
- if (deleteEstimatePoint && deleteEstimatePoint.length > 0) {
+ if (deleteEstimatePoint) {
runInAction(() => {
deleteEstimatePoint.map((estimatePoint) => {
if (estimatePoint.id)