diff --git a/apiserver/plane/bgtasks/analytic_plot_export.py b/apiserver/plane/bgtasks/analytic_plot_export.py index ca8ee1ab6..67df70792 100644 --- a/apiserver/plane/bgtasks/analytic_plot_export.py +++ b/apiserver/plane/bgtasks/analytic_plot_export.py @@ -28,7 +28,7 @@ row_mapping = { "created_at": "Created At", "issue_count": "Issue Count", "priority": "Priority", - "effort": "Effort", + "estimate": "Estimate", } @@ -46,7 +46,7 @@ def analytic_export_task(email, data, slug): queryset=queryset, x_axis=x_axis, y_axis=y_axis, segment=segment ) - key = "count" if y_axis == "issue_count" else "effort" + key = "count" if y_axis == "issue_count" else "estimate" if segment: segment_zero = [] @@ -114,7 +114,7 @@ def analytic_export_task(email, data, slug): item, distribution.get(item)[0].get("count") if y_axis == "issue_count" - else distribution.get(item)[0].get("effort"), + else distribution.get(item)[0].get("estimate"), ] ) ) diff --git a/apiserver/plane/utils/analytics_plot.py b/apiserver/plane/utils/analytics_plot.py index 838f535ff..7106769a6 100644 --- a/apiserver/plane/utils/analytics_plot.py +++ b/apiserver/plane/utils/analytics_plot.py @@ -50,14 +50,14 @@ def build_graph_plot(queryset, x_axis, y_axis, segment=None): queryset = queryset.annotate(count=Count("*")).order_by("dimension") - if y_axis == "effort": - queryset = queryset.annotate(effort=Sum("estimate_point")).order_by(x_axis) + if y_axis == "estimate": + queryset = queryset.annotate(estimate=Sum("estimate_point")).order_by(x_axis) if segment: queryset = queryset.annotate(segment=F(segment)).values( - "dimension", "segment", "effort" + "dimension", "segment", "estimate" ) else: - queryset = queryset.values("dimension", "effort") + queryset = queryset.values("dimension", "estimate") result_values = list(queryset) grouped_data = {}