[WEB-522] chore: enabled estimate point analytics for module and cycle (#4763)
* chore: updated modal and form validations * chore: module estimate analytics * chore: state analytics * chore: cycle estimate analytics * chore: module points serializer * chore: added fields in serializer * chore: module state estimate points * dev: updated module analytics * dev: updated hover description on the burndown * dev: UI and module total percentage validation * chore: estimate points structure change * chore: module burndown * chore: key values changed * chore: cycle progress snapshot * chore: cycle detail endpoint * chore: progress snapshot payload change * chore: resolved merge conflicts * chore: updated issue and point dropdown in active cycle * chore: optimized grouped issues count in cycle and module --------- Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
This commit is contained in:
parent
8071350640
commit
61d8586f7f
26 changed files with 2373 additions and 858 deletions
116
packages/types/src/cycle/cycle.d.ts
vendored
116
packages/types/src/cycle/cycle.d.ts
vendored
|
|
@ -2,32 +2,81 @@ import type { TIssue, IIssueFilterOptions } from "@plane/types";
|
|||
|
||||
export type TCycleGroups = "current" | "upcoming" | "completed" | "draft";
|
||||
|
||||
export interface ICycle {
|
||||
backlog_issues: number;
|
||||
cancelled_issues: number;
|
||||
export type TCycleCompletionChartDistribution = {
|
||||
[key: string]: number | null;
|
||||
};
|
||||
|
||||
export type TCycleDistributionBase = {
|
||||
total_issues: number;
|
||||
pending_issues: number;
|
||||
completed_issues: number;
|
||||
};
|
||||
|
||||
export type TCycleEstimateDistributionBase = {
|
||||
total_estimates: number;
|
||||
pending_estimates: number;
|
||||
completed_estimates: number;
|
||||
};
|
||||
|
||||
export type TCycleAssigneesDistribution = {
|
||||
assignee_id: string | null;
|
||||
avatar: string | null;
|
||||
first_name: string | null;
|
||||
last_name: string | null;
|
||||
display_name: string | null;
|
||||
};
|
||||
|
||||
export type TCycleLabelsDistribution = {
|
||||
color: string | null;
|
||||
label_id: string | null;
|
||||
label_name: string | null;
|
||||
};
|
||||
|
||||
export type TCycleDistribution = {
|
||||
assignees: (TCycleAssigneesDistribution & TCycleDistributionBase)[];
|
||||
completion_chart: TCycleCompletionChartDistribution;
|
||||
labels: (TCycleLabelsDistribution & TCycleDistributionBase)[];
|
||||
};
|
||||
|
||||
export type TCycleEstimateDistribution = {
|
||||
assignees: (TCycleAssigneesDistribution & TCycleEstimateDistributionBase)[];
|
||||
completion_chart: TCycleCompletionChartDistribution;
|
||||
labels: (TCycleLabelsDistribution & TCycleEstimateDistributionBase)[];
|
||||
};
|
||||
|
||||
export type TProgressSnapshot = {
|
||||
total_issues: number;
|
||||
completed_issues: number;
|
||||
backlog_issues: number;
|
||||
started_issues: number;
|
||||
unstarted_issues: number;
|
||||
cancelled_issues: number;
|
||||
total_estimate_points?: number;
|
||||
completed_estimate_points?: number;
|
||||
backlog_estimate_points: number;
|
||||
started_estimate_points: number;
|
||||
unstarted_estimate_points: number;
|
||||
cancelled_estimate_points: number;
|
||||
distribution?: TCycleDistribution;
|
||||
estimate_distribution?: TCycleEstimateDistribution;
|
||||
};
|
||||
|
||||
export interface ICycle extends TProgressSnapshot {
|
||||
progress_snapshot: TProgressSnapshot | undefined;
|
||||
|
||||
created_at?: string;
|
||||
created_by?: string;
|
||||
description: string;
|
||||
distribution?: {
|
||||
assignees: TAssigneesDistribution[];
|
||||
completion_chart: TCompletionChartDistribution;
|
||||
labels: TLabelsDistribution[];
|
||||
};
|
||||
end_date: string | null;
|
||||
id: string;
|
||||
is_favorite?: boolean;
|
||||
name: string;
|
||||
owned_by_id: string;
|
||||
progress_snapshot: TProgressSnapshot;
|
||||
project_id: string;
|
||||
status?: TCycleGroups;
|
||||
sort_order: number;
|
||||
start_date: string | null;
|
||||
started_issues: number;
|
||||
sub_issues?: number;
|
||||
total_issues: number;
|
||||
unstarted_issues: number;
|
||||
updated_at?: string;
|
||||
updated_by?: string;
|
||||
archived_at: string | null;
|
||||
|
|
@ -38,47 +87,6 @@ export interface ICycle {
|
|||
workspace_id: string;
|
||||
}
|
||||
|
||||
export type TProgressSnapshot = {
|
||||
backlog_issues: number;
|
||||
cancelled_issues: number;
|
||||
completed_estimates: number | null;
|
||||
completed_issues: number;
|
||||
distribution?: {
|
||||
assignees: TAssigneesDistribution[];
|
||||
completion_chart: TCompletionChartDistribution;
|
||||
labels: TLabelsDistribution[];
|
||||
};
|
||||
started_estimates: number | null;
|
||||
started_issues: number;
|
||||
total_estimates: number | null;
|
||||
total_issues: number;
|
||||
unstarted_issues: number;
|
||||
};
|
||||
|
||||
export type TAssigneesDistribution = {
|
||||
assignee_id: string | null;
|
||||
avatar: string | null;
|
||||
completed_issues: number;
|
||||
first_name: string | null;
|
||||
last_name: string | null;
|
||||
display_name: string | null;
|
||||
pending_issues: number;
|
||||
total_issues: number;
|
||||
};
|
||||
|
||||
export type TCompletionChartDistribution = {
|
||||
[key: string]: number | null;
|
||||
};
|
||||
|
||||
export type TLabelsDistribution = {
|
||||
color: string | null;
|
||||
completed_issues: number;
|
||||
label_id: string | null;
|
||||
label_name: string | null;
|
||||
pending_issues: number;
|
||||
total_issues: number;
|
||||
};
|
||||
|
||||
export interface CycleIssueResponse {
|
||||
id: string;
|
||||
issue_detail: TIssue;
|
||||
|
|
@ -102,3 +110,5 @@ export type CycleDateCheckData = {
|
|||
end_date: string;
|
||||
cycle_id?: string;
|
||||
};
|
||||
|
||||
export type TCyclePlotType = "burndown" | "points";
|
||||
|
|
|
|||
113
packages/types/src/module/modules.d.ts
vendored
113
packages/types/src/module/modules.d.ts
vendored
|
|
@ -1,11 +1,4 @@
|
|||
import type {
|
||||
TIssue,
|
||||
IIssueFilterOptions,
|
||||
ILinkDetails,
|
||||
TAssigneesDistribution,
|
||||
TCompletionChartDistribution,
|
||||
TLabelsDistribution,
|
||||
} from "@plane/types";
|
||||
import type { TIssue, IIssueFilterOptions, ILinkDetails } from "@plane/types";
|
||||
|
||||
export type TModuleStatus =
|
||||
| "backlog"
|
||||
|
|
@ -15,44 +8,88 @@ export type TModuleStatus =
|
|||
| "completed"
|
||||
| "cancelled";
|
||||
|
||||
export interface IModule {
|
||||
backlog_issues: number;
|
||||
cancelled_issues: number;
|
||||
export type TModuleCompletionChartDistribution = {
|
||||
[key: string]: number | null;
|
||||
};
|
||||
|
||||
export type TModuleDistributionBase = {
|
||||
total_issues: number;
|
||||
pending_issues: number;
|
||||
completed_issues: number;
|
||||
created_at: string;
|
||||
created_by?: string;
|
||||
};
|
||||
|
||||
export type TModuleEstimateDistributionBase = {
|
||||
total_estimates: number;
|
||||
pending_estimates: number;
|
||||
completed_estimates: number;
|
||||
};
|
||||
|
||||
export type TModuleAssigneesDistribution = {
|
||||
assignee_id: string | null;
|
||||
avatar: string | null;
|
||||
first_name: string | null;
|
||||
last_name: string | null;
|
||||
display_name: string | null;
|
||||
};
|
||||
|
||||
export type TModuleLabelsDistribution = {
|
||||
color: string | null;
|
||||
label_id: string | null;
|
||||
label_name: string | null;
|
||||
};
|
||||
|
||||
export type TModuleDistribution = {
|
||||
assignees: (TModuleAssigneesDistribution & TModuleDistributionBase)[];
|
||||
completion_chart: TModuleCompletionChartDistribution;
|
||||
labels: (TModuleLabelsDistribution & TModuleDistributionBase)[];
|
||||
};
|
||||
|
||||
export type TModuleEstimateDistribution = {
|
||||
assignees: (TModuleAssigneesDistribution & TModuleEstimateDistributionBase)[];
|
||||
completion_chart: TModuleCompletionChartDistribution;
|
||||
labels: (TModuleLabelsDistribution & TModuleEstimateDistributionBase)[];
|
||||
};
|
||||
|
||||
export interface IModule {
|
||||
total_issues: number;
|
||||
completed_issues: number;
|
||||
backlog_issues: number;
|
||||
started_issues: number;
|
||||
unstarted_issues: number;
|
||||
cancelled_issues: number;
|
||||
total_estimate_points?: number;
|
||||
completed_estimate_points?: number;
|
||||
backlog_estimate_points: number;
|
||||
started_estimate_points: number;
|
||||
unstarted_estimate_points: number;
|
||||
cancelled_estimate_points: number;
|
||||
distribution?: TModuleDistribution;
|
||||
estimate_distribution?: TModuleEstimateDistribution;
|
||||
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
description_text: any;
|
||||
description_html: any;
|
||||
distribution?: {
|
||||
assignees: TAssigneesDistribution[];
|
||||
completion_chart: TCompletionChartDistribution;
|
||||
labels: TLabelsDistribution[];
|
||||
};
|
||||
id: string;
|
||||
lead_id: string | null;
|
||||
link_module?: ILinkDetails[];
|
||||
member_ids: string[];
|
||||
is_favorite: boolean;
|
||||
name: string;
|
||||
workspace_id: string;
|
||||
project_id: string;
|
||||
sort_order: number;
|
||||
lead_id: string | null;
|
||||
member_ids: string[];
|
||||
link_module?: ILinkDetails[];
|
||||
sub_issues?: number;
|
||||
start_date: string | null;
|
||||
started_issues: number;
|
||||
status?: TModuleStatus;
|
||||
target_date: string | null;
|
||||
total_issues: number;
|
||||
unstarted_issues: number;
|
||||
total_estimate_points?: number;
|
||||
completed_estimate_points?: number;
|
||||
updated_at: string;
|
||||
updated_by?: string;
|
||||
archived_at: string | null;
|
||||
is_favorite: boolean;
|
||||
sort_order: number;
|
||||
view_props: {
|
||||
filters: IIssueFilterOptions;
|
||||
};
|
||||
workspace_id: string;
|
||||
status?: TModuleStatus;
|
||||
archived_at: string | null;
|
||||
start_date: string | null;
|
||||
target_date: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
created_by?: string;
|
||||
updated_by?: string;
|
||||
}
|
||||
|
||||
export interface ModuleIssueResponse {
|
||||
|
|
@ -78,3 +115,5 @@ export type ModuleLink = {
|
|||
export type SelectModuleType =
|
||||
| (IModule & { actionType: "edit" | "delete" | "create-issue" })
|
||||
| undefined;
|
||||
|
||||
export type TModulePlotType = "burndown" | "points";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue