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-3877] fix: changed logic to calculate cycle duration (#7024)

Bavisetti Narayan6faff1d556f0
diff --git a/apiserver/plane/utils/analytics_plot.py b/apiserver/plane/utils/analytics_plot.py
index 7527a3524a..9e2f8c59dd 100644
--- a/apiserver/plane/utils/analytics_plot.py
+++ b/apiserver/plane/utils/analytics_plot.py
@@ -140,7 +140,9 @@ def burndown_plot(queryset, slug, project_id, plot_type, cycle_id=None, module_i
# Get all dates between the two dates
date_range = [
(queryset.start_date + timedelta(days=x)).date()
- for x in range((queryset.end_date - queryset.start_date).days + 1)
+ for x in range(
+ (queryset.end_date.date() - queryset.start_date.date()).days + 1
+ )
]
else:
date_range = []
@@ -180,7 +182,9 @@ def burndown_plot(queryset, slug, project_id, plot_type, cycle_id=None, module_i
# Get all dates between the two dates
date_range = [
(queryset.start_date + timedelta(days=x))
- for x in range((queryset.target_date - queryset.start_date).days + 1)
+ for x in range(
+ (queryset.target_date - queryset.start_date).days + 1
+ )
]
chart_data = {str(date): 0 for date in date_range}