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-522] chore: handled numeric validation on estimate point update in categories (#4819)

guru_sainath707c4f9e8d90
diff --git a/web/core/components/estimates/points/create.tsx b/web/core/components/estimates/points/create.tsx
index e9a7e35dc9..4a0967aa00 100644
--- a/web/core/components/estimates/points/create.tsx
+++ b/web/core/components/estimates/points/create.tsx
@@ -86,7 +86,7 @@ export const EstimatePointCreate: FC<TEstimatePointCreate> = observer((props) =>
isEstimateValid = true;
}
} else if (currentEstimateType && currentEstimateType === EEstimateSystem.CATEGORIES) {
- if (estimateInputValue && estimateInputValue.length > 0 && Number(estimateInputValue) < 0) {
+ if (estimateInputValue && estimateInputValue.length > 0 && isNaN(Number(estimateInputValue))) {
isEstimateValid = true;
}
}
diff --git a/web/core/components/estimates/points/update.tsx b/web/core/components/estimates/points/update.tsx
index e20cbcfb16..4194f4b2df 100644
--- a/web/core/components/estimates/points/update.tsx
+++ b/web/core/components/estimates/points/update.tsx
@@ -91,7 +91,7 @@ export const EstimatePointUpdate: FC<TEstimatePointUpdate> = observer((props) =>
isEstimateValid = true;
}
} else if (currentEstimateType && currentEstimateType === EEstimateSystem.CATEGORIES) {
- if (estimateInputValue && estimateInputValue.length > 0) {
+ if (estimateInputValue && estimateInputValue.length > 0 && isNaN(Number(estimateInputValue))) {
isEstimateValid = true;
}
}