Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
1ed74e7
chore: analytics endpoint
NarayanBavisetti Apr 24, 2025
ef45ded
added anlytics v2
JayashTripathy Apr 25, 2025
b871ac2
Merge remote-tracking branch 'origin/chore-advance-analytics' into an…
JayashTripathy Apr 25, 2025
0266a05
updated status icons
JayashTripathy Apr 25, 2025
d8536d1
added area chart in workitems and en translations
JayashTripathy Apr 28, 2025
3b254b3
active projects
JayashTripathy Apr 28, 2025
a281b12
chore: created analytics chart
NarayanBavisetti Apr 29, 2025
c2a5e98
chore: validation errors
NarayanBavisetti Apr 29, 2025
20558f9
improved radar-chart , added empty states , added projects summary
JayashTripathy Apr 29, 2025
faf9efc
Merge remote-tracking branch 'origin/chore-advance-analytics' into an…
JayashTripathy Apr 29, 2025
74b6965
chore: added a new graph in advance analytics
NarayanBavisetti Apr 29, 2025
ed3ab3b
Merge remote-tracking branch 'origin/chore-advance-analytics' into an…
JayashTripathy Apr 29, 2025
38bbd4e
integrated priority chart
JayashTripathy Apr 29, 2025
f638bf0
chore: added csv exporter
NarayanBavisetti Apr 29, 2025
3fba6ef
added priority dropdown
JayashTripathy Apr 29, 2025
bfc4274
Merge branch 'preview' of https://github.com/makeplane/plane into ana…
JayashTripathy Apr 29, 2025
f3070fa
Merge branch 'preview' into analytics-page-enhancements
JayashTripathy Apr 30, 2025
2eb71eb
integrated created vs resolved chart
JayashTripathy Apr 30, 2025
d7f4b15
Merge remote-tracking branch 'origin/chore-advance-analytics' into an…
JayashTripathy Apr 30, 2025
657c048
custom x and y axis label in bar and area chart
JayashTripathy Apr 30, 2025
c4d0529
added wrapper styles to legends
JayashTripathy Apr 30, 2025
a18bc0d
added filter components
JayashTripathy Apr 30, 2025
e67809b
fixed temp data imports
JayashTripathy Apr 30, 2025
1d636dd
integrated filters in priority charts
JayashTripathy May 1, 2025
fc8963d
added label to priority chart and updated duration filter
JayashTripathy May 1, 2025
deac8f1
refactor
JayashTripathy May 1, 2025
82cf159
reverted to void onchange
JayashTripathy May 1, 2025
2ed772d
fixed some contant exports
JayashTripathy May 1, 2025
7597fad
Merge branch 'preview' of github.com:makeplane/plane into chore-advan…
NarayanBavisetti May 1, 2025
edaf34f
fixed type issues
JayashTripathy May 1, 2025
fcbc96b
fixed some type and build issues
JayashTripathy May 1, 2025
5eb42d9
chore: updated the filtering logic for analytics
NarayanBavisetti May 2, 2025
f722938
updated default value to last_30_days
JayashTripathy May 2, 2025
a4c8aeb
percentage value whole number and added some rules for axis options
JayashTripathy May 2, 2025
02fcc64
fixed some translations
JayashTripathy May 2, 2025
59c3b99
added - custom tick for radar, calc of insight cards, filter labels
JayashTripathy May 2, 2025
c792fff
chore: opitmised the analytics endpoint
NarayanBavisetti May 2, 2025
67a0779
Merge branch 'preview' of github.com:makeplane/plane into analytics-p…
NarayanBavisetti May 2, 2025
725ab97
Merge branch 'chore-advance-analytics' of github.com:makeplane/plane …
NarayanBavisetti May 2, 2025
7f02300
replace old analytics path with new , updated labels of insight card,…
JayashTripathy May 2, 2025
c8040f2
chore: updated the export request
NarayanBavisetti May 2, 2025
4739f91
Enhanced ProjectSelect to support multi-select, improved state manage…
JayashTripathy May 2, 2025
3da410a
Merge branch 'analytics-page-enhancements' of https://github.com/make…
JayashTripathy May 2, 2025
acd4c60
fix: round completion percentage calculation in ActiveProjectItem
JayashTripathy May 2, 2025
d7b915c
added empty states in project insights
JayashTripathy May 4, 2025
facbe70
Added loader and empty state in created/resolved chart
JayashTripathy May 4, 2025
80d23f1
added loaders
JayashTripathy May 4, 2025
61ab58f
added icons in filters
JayashTripathy May 5, 2025
3521fb1
added custom colors in customised charts
JayashTripathy May 5, 2025
060df17
cleaned up some code
JayashTripathy May 5, 2025
7c666d6
added some responsiveness
JayashTripathy May 6, 2025
b66d773
Merge branch 'preview' of https://github.com/makeplane/plane into ana…
JayashTripathy May 6, 2025
93e7747
updated translations
JayashTripathy May 6, 2025
03316b0
updated serrchbar for the table
JayashTripathy May 6, 2025
717d14a
added work item modal in project analytics
JayashTripathy May 6, 2025
1894e92
Merge branch 'preview' of https://github.com/makeplane/plane into ana…
JayashTripathy May 7, 2025
8010c76
fixed some of the layput issues in the peek view
JayashTripathy May 7, 2025
bdc9eb0
chore: updated the base function for viewsets
NarayanBavisetti May 7, 2025
0afdcda
Merge branch 'chore-advance-analytics' of github.com:makeplane/plane …
NarayanBavisetti May 7, 2025
6a775d3
synced tab to url
JayashTripathy May 7, 2025
d715691
code cleanup
JayashTripathy May 7, 2025
2d8f286
Merge branch 'preview' of https://github.com/makeplane/plane into ana…
JayashTripathy May 7, 2025
9c2877b
chore: updated the export logic
NarayanBavisetti May 7, 2025
214f04e
fixed project_ids filter
JayashTripathy May 7, 2025
aecbb14
added icon in projectdropdown
JayashTripathy May 7, 2025
47c6d6d
updated export button position
JayashTripathy May 7, 2025
aab102c
export csv and emptystates icons
JayashTripathy May 8, 2025
f822621
refactor
JayashTripathy May 8, 2025
b779e49
code refactor
JayashTripathy May 8, 2025
5b9c3f4
Merge branch 'chore-advance-analytics' of github.com:makeplane/plane …
NarayanBavisetti May 9, 2025
1c00120
Merge branch 'analytics-page-enhancements' of github.com:makeplane/pl…
NarayanBavisetti May 9, 2025
3c1e891
updated loaders, moved color pallete to contants, added nullish colla…
JayashTripathy May 9, 2025
458be60
removed uneccessary cn
JayashTripathy May 9, 2025
db3f85d
fixed formatting issues
JayashTripathy May 9, 2025
073d7e3
fixed empty project_ids in payload
JayashTripathy May 9, 2025
3b86010
Merge branch 'preview' of https://github.com/makeplane/plane into ana…
JayashTripathy May 9, 2025
5d6315e
improved null checks
JayashTripathy May 9, 2025
edb6834
optimized charts
JayashTripathy May 11, 2025
618005b
Merge branch 'analytics-page-enhancements' of github.com:makeplane/pl…
NarayanBavisetti May 12, 2025
7933938
Merge branch 'preview' of github.com:makeplane/plane into analytics-p…
NarayanBavisetti May 12, 2025
ba62fc2
modified relevant variables to observable.ref
JayashTripathy May 12, 2025
1db2b52
Merge branch 'analytics-page-enhancements' of https://github.com/make…
JayashTripathy May 12, 2025
4de46e8
fixed the duration type
JayashTripathy May 12, 2025
b90792d
optimized some code
JayashTripathy May 12, 2025
ed7a9a6
updated query key in project-insight
JayashTripathy May 12, 2025
aa90854
updated query key in project-insight
JayashTripathy May 12, 2025
97c8d79
updated formatting
JayashTripathy May 12, 2025
56975b2
chore: replaced analytics route with new one and done some optimizations
JayashTripathy May 12, 2025
df46d1f
removed the old analytics
JayashTripathy May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions apiserver/plane/app/views/analytic/advance.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@
ProjectPage,
)

from django.db.models import (
Q,
Count,
)
from plane.utils.build_chart import build_analytics_chart
from datetime import timedelta
from plane.bgtasks.analytic_plot_export import export_analytics_to_csv_email
from plane.utils.date_utils import (
get_analytics_filters,
)

from plane.utils.build_chart import build_analytics_chart
from plane.bgtasks.analytic_plot_export import export_analytics_to_csv_email
from plane.utils.date_utils import get_analytics_filters
Expand All @@ -35,6 +46,7 @@ def initialize_workspace(self, slug: str, type: str) -> None:


class AdvanceAnalyticsEndpoint(AdvanceAnalyticsBaseView):

def get_filtered_counts(self, queryset: QuerySet) -> Dict[str, int]:
def get_filtered_count() -> int:
if self.filters["analytics_date_range"]:
Expand Down Expand Up @@ -111,6 +123,7 @@ def get_overview_data(self) -> Dict[str, Dict[str, int]]:
),
}


def get_work_items_stats(self) -> Dict[str, Dict[str, int]]:
base_queryset = Issue.objects.filter(**self.filters["base_filters"])

Expand Down Expand Up @@ -193,6 +206,7 @@ def project_chart(self) -> List[Dict[str, Any]]:
# Get the base queryset with workspace and project filters
base_queryset = Issue.issue_objects.filter(**self.filters["base_filters"])
date_filter = {}

# Apply date range filter if available
if self.filters["chart_period_range"]:
start_date, end_date = self.filters["chart_period_range"]
Expand Down
105 changes: 105 additions & 0 deletions packages/constants/src/analytics-v2/common.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import { TAnalyticsTabsV2Base } from "@plane/types";
import { ChartXAxisProperty, ChartYAxisMetric } from "../chart";

export const insightsFields: Record<TAnalyticsTabsV2Base, string[]> = {
overview: [
"total_users",
"total_admins",
"total_members",
"total_guests",
"total_projects",
"total_work_items",
"total_cycles",
"total_intake",
],
"work-items": [
"total_work_items",
"started_work_items",
"backlog_work_items",
"un_started_work_items",
"completed_work_items",
],
};

export const ANALYTICS_V2_DURATION_FILTER_OPTIONS = [
{
name: "Yesterday",
value: "yesterday",
},
{
name: "Last 7 days",
value: "last_7_days",
},
{
name: "Last 30 days",
value: "last_30_days",
},
{
name: "Last 3 months",
value: "last_3_months",
},
];

export const ANALYTICS_V2_X_AXIS_VALUES: { value: ChartXAxisProperty; label: string }[] = [
{
value: ChartXAxisProperty.STATES,
label: "State name",
},
{
value: ChartXAxisProperty.STATE_GROUPS,
label: "State group",
},
{
value: ChartXAxisProperty.PRIORITY,
label: "Priority",
},
{
value: ChartXAxisProperty.LABELS,
label: "Label",
},
{
value: ChartXAxisProperty.ASSIGNEES,
label: "Assignee",
},
{
value: ChartXAxisProperty.ESTIMATE_POINTS,
label: "Estimate point",
},
{
value: ChartXAxisProperty.CYCLES,
label: "Cycle",
},
{
value: ChartXAxisProperty.MODULES,
label: "Module",
},
{
value: ChartXAxisProperty.COMPLETED_AT,
label: "Completed date",
},
{
value: ChartXAxisProperty.TARGET_DATE,
label: "Due date",
},
{
value: ChartXAxisProperty.START_DATE,
label: "Start date",
},
{
value: ChartXAxisProperty.CREATED_AT,
label: "Created date",
},
];

export const ANALYTICS_V2_Y_AXIS_VALUES: { value: ChartYAxisMetric; label: string }[] = [
{
value: ChartYAxisMetric.WORK_ITEM_COUNT,
label: "Work item",
},
{
value: ChartYAxisMetric.ESTIMATE_POINT_COUNT,
label: "Estimate",
},
];

export const ANALYTICS_V2_DATE_KEYS = ["completed_at", "target_date", "start_date", "created_at"];
1 change: 1 addition & 0 deletions packages/constants/src/analytics-v2/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./common"
155 changes: 155 additions & 0 deletions packages/constants/src/chart.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,157 @@
import { TChartColorScheme } from "@plane/types";

export const LABEL_CLASSNAME = "uppercase text-custom-text-300/60 text-sm tracking-wide";
export const AXIS_LABEL_CLASSNAME = "uppercase text-custom-text-300/60 text-sm tracking-wide";


export enum ChartXAxisProperty {
STATES = "STATES",
STATE_GROUPS = "STATE_GROUPS",
LABELS = "LABELS",
ASSIGNEES = "ASSIGNEES",
ESTIMATE_POINTS = "ESTIMATE_POINTS",
CYCLES = "CYCLES",
MODULES = "MODULES",
PRIORITY = "PRIORITY",
START_DATE = "START_DATE",
TARGET_DATE = "TARGET_DATE",
CREATED_AT = "CREATED_AT",
COMPLETED_AT = "COMPLETED_AT",
CREATED_BY = "CREATED_BY",
WORK_ITEM_TYPES = "WORK_ITEM_TYPES",
PROJECTS = "PROJECTS",
EPICS = "EPICS",
}

export enum ChartYAxisMetric {
WORK_ITEM_COUNT = "WORK_ITEM_COUNT",
ESTIMATE_POINT_COUNT = "ESTIMATE_POINT_COUNT",
PENDING_WORK_ITEM_COUNT = "PENDING_WORK_ITEM_COUNT",
COMPLETED_WORK_ITEM_COUNT = "COMPLETED_WORK_ITEM_COUNT",
IN_PROGRESS_WORK_ITEM_COUNT = "IN_PROGRESS_WORK_ITEM_COUNT",
WORK_ITEM_DUE_THIS_WEEK_COUNT = "WORK_ITEM_DUE_THIS_WEEK_COUNT",
WORK_ITEM_DUE_TODAY_COUNT = "WORK_ITEM_DUE_TODAY_COUNT",
BLOCKED_WORK_ITEM_COUNT = "BLOCKED_WORK_ITEM_COUNT",
}


export enum ChartXAxisDateGrouping {
DAY = "DAY",
WEEK = "WEEK",
MONTH = "MONTH",
YEAR = "YEAR",
}

export const TO_CAPITALIZE_PROPERTIES: ChartXAxisProperty[] = [
ChartXAxisProperty.PRIORITY,
ChartXAxisProperty.STATE_GROUPS,
];

export const CHART_X_AXIS_DATE_PROPERTIES: ChartXAxisProperty[] = [
ChartXAxisProperty.START_DATE,
ChartXAxisProperty.TARGET_DATE,
ChartXAxisProperty.CREATED_AT,
ChartXAxisProperty.COMPLETED_AT,
];


export enum EChartModels {
BASIC = "BASIC",
STACKED = "STACKED",
GROUPED = "GROUPED",
MULTI_LINE = "MULTI_LINE",
COMPARISON = "COMPARISON",
PROGRESS = "PROGRESS",
}

export const CHART_COLOR_PALETTES: {
key: TChartColorScheme;
i18n_label: string;
light: string[];
dark: string[];
}[] = [
{
key: "modern",
i18n_label: "dashboards.widget.color_palettes.modern",
light: [
"#6172E8",
"#8B6EDB",
"#E05F99",
"#29A383",
"#CB8A37",
"#3AA7C1",
"#F1B24A",
"#E84855",
"#50C799",
"#B35F9E",
],
dark: [
"#6B7CDE",
"#8E9DE6",
"#D45D9E",
"#2EAF85",
"#D4A246",
"#29A7C1",
"#B89F6A",
"#D15D64",
"#4ED079",
"#A169A4",
],
},
{
key: "horizon",
i18n_label: "dashboards.widget.color_palettes.horizon",
light: [
"#E76E50",
"#289D90",
"#F3A362",
"#E9C368",
"#264753",
"#8A6FA0",
"#5B9EE5",
"#7CC474",
"#BA7DB5",
"#CF8640",
],
dark: [
"#E05A3A",
"#1D8A7E",
"#D98B4D",
"#D1AC50",
"#3A6B7C",
"#7D6297",
"#4D8ACD",
"#569C64",
"#C16A8C",
"#B77436",
],
},
{
key: "earthen",
i18n_label: "dashboards.widget.color_palettes.earthen",
light: [
"#386641",
"#6A994E",
"#A7C957",
"#E97F4E",
"#BC4749",
"#9E2A2B",
"#80CED1",
"#5C3E79",
"#526EAB",
"#6B5B95",
],
dark: [
"#497752",
"#7BAA5F",
"#B8DA68",
"#FA905F",
"#CD585A",
"#AF3B3C",
"#91DFE2",
"#6D4F8A",
"#637FBC",
"#7C6CA6",
],
},
];
1 change: 1 addition & 0 deletions packages/constants/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ export * from "./page";
export * from "./emoji";
export * from "./subscription";
export * from "./icon";
export * from "./analytics-v2";
2 changes: 2 additions & 0 deletions packages/constants/src/state.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use client"
export type TStateGroups = "backlog" | "unstarted" | "started" | "completed" | "cancelled";

export type TDraggableData = {
Expand Down Expand Up @@ -77,4 +78,5 @@ export const PROGRESS_STATE_GROUPS_DETAILS = [
},
];


export const DISPLAY_WORKFLOW_PRO_CTA = false;
33 changes: 32 additions & 1 deletion packages/i18n/src/locales/cs/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,38 @@
}
}
}
}
},
"empty_state_v2": {
"customized_insights": {
"description": "Pracovní položky přiřazené vám, rozdělené podle stavu, se zde zobrazí.",
"title": "Zatím žádná data"
},
"created_vs_resolved": {
"description": "Pracovní položky vytvořené a vyřešené v průběhu času se zde zobrazí.",
"title": "Zatím žádná data"
},
"project_insights": {
"title": "Zatím žádná data",
"description": "Pracovní položky přiřazené vám, rozdělené podle stavu, se zde zobrazí."
}
},
"created_vs_resolved": "Vytvořeno vs Vyřešeno",
"customized_insights": "Přizpůsobené přehledy",
"backlog_work_items": "Pracovní položky v backlogu",
"active_projects": "Aktivní projekty",
"trend_on_charts": "Trend na grafech",
"all_projects": "Všechny projekty",
"summary_of_projects": "Souhrn projektů",
"project_insights": "Přehled projektu",
"started_work_items": "Zahájené pracovní položky",
"total_work_items": "Celkový počet pracovních položek",
"total_projects": "Celkový počet projektů",
"total_admins": "Celkový počet administrátorů",
"total_users": "Celkový počet uživatelů",
"total_intake": "Celkový příjem",
"un_started_work_items": "Nezahájené pracovní položky",
"total_guests": "Celkový počet hostů",
"completed_work_items": "Dokončené pracovní položky"
},
"workspace_projects": {
"label": "{count, plural, one {Projekt} few {Projekty} other {Projektů}}",
Expand Down
Loading