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 maximum no of char that user can enter in estimate point create and update (#4913)

guru_sainath1c8e7098709d
diff --git a/web/ce/constants/estimates.ts b/web/ce/constants/estimates.ts
index 5b068e400c..7ffe761a8b 100644
--- a/web/ce/constants/estimates.ts
+++ b/web/ce/constants/estimates.ts
@@ -1,6 +1,8 @@
// types
import { TEstimateSystems } from "@plane/types";
+export const MAX_ESTIMATE_POINT_INPUT_LENGTH = 20;
+
export enum EEstimateSystem {
POINTS = "points",
CATEGORIES = "categories",
diff --git a/web/core/components/estimates/points/create.tsx b/web/core/components/estimates/points/create.tsx
index 274b19d901..89a4dbaf35 100644
--- a/web/core/components/estimates/points/create.tsx
+++ b/web/core/components/estimates/points/create.tsx
@@ -11,7 +11,7 @@ import { isEstimatePointValuesRepeated } from "@/helpers/estimates";
// hooks
import { useEstimate } from "@/hooks/store";
// plane web constants
-import { EEstimateSystem } from "@/plane-web/constants/estimates";
+import { EEstimateSystem, MAX_ESTIMATE_POINT_INPUT_LENGTH } from "@/plane-web/constants/estimates";
type TEstimatePointCreate = {
workspaceSlug: string;
@@ -155,7 +155,7 @@ export const EstimatePointCreate: FC<TEstimatePointCreate> = observer((props) =>
const inputProps = {
type: inputFieldType,
pattern: inputFieldType === "number" ? "[0-9]*" : undefined,
- maxlength: inputFieldType === "number" ? undefined : 24,
+ maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH,
};
return (
diff --git a/web/core/components/estimates/points/update.tsx b/web/core/components/estimates/points/update.tsx
index c0f1df6a45..747d2b64d6 100644
--- a/web/core/components/estimates/points/update.tsx
+++ b/web/core/components/estimates/points/update.tsx
@@ -11,7 +11,7 @@ import { isEstimatePointValuesRepeated } from "@/helpers/estimates";
// hooks
import { useEstimatePoint } from "@/hooks/store";
// plane web constants
-import { EEstimateSystem } from "@/plane-web/constants/estimates";
+import { EEstimateSystem, MAX_ESTIMATE_POINT_INPUT_LENGTH } from "@/plane-web/constants/estimates";
type TEstimatePointUpdate = {
workspaceSlug: string;
@@ -163,7 +163,7 @@ export const EstimatePointUpdate: FC<TEstimatePointUpdate> = observer((props) =>
const inputProps = {
type: inputFieldType,
pattern: inputFieldType === "number" ? "[0-9]*" : undefined,
- maxlength: inputFieldType === "number" ? undefined : 24,
+ maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH,
};
return (