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

* chore: mutating issue estimation_point when we delete the eatimate point from the project

* chore: updated try catch

* chore: updated removed issues length check on estimate delete
This commit is contained in:
guru_sainath
2024-06-18 20:21:13 +05:30
committed by GitHub
parent a06beaa312
commit 0b4faf7db2

View File

@@ -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)