chore: rename effort to estimate (#1053)

This commit is contained in:
pablohashescobar 2023-05-16 10:50:14 +05:30 committed by GitHub
parent c6d78b5e6a
commit 84a0f6f77e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -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"),
]
)
)

View File

@ -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 = {}