Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WEB-522] chore: enabled estimate point analytics for module and cycle #4763

Merged
merged 31 commits into from
Jun 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b302add
chore: updated modal and form validations
gurusainath Jun 10, 2024
3996e58
Merge branch 'develop' of gurusainath:makeplane/plane into estimate-v…
gurusainath Jun 10, 2024
92c1cff
chore: module estimate analytics
NarayanBavisetti Jun 11, 2024
62b8638
Merge branch 'estimate-module-cycle-analytics' of gurusainath:makepla…
gurusainath Jun 11, 2024
866b0df
Merge branch 'develop' of github.com:makeplane/plane into estimate-mo…
NarayanBavisetti Jun 11, 2024
5e7cd78
Merge branch 'estimate-module-cycle-analytics' of github.com:makeplan…
NarayanBavisetti Jun 11, 2024
6ccdba2
chore: state analytics
NarayanBavisetti Jun 11, 2024
4c28f0f
chore: cycle estimate analytics
NarayanBavisetti Jun 11, 2024
7c2f4c2
Merge branch 'develop' of gurusainath:makeplane/plane into estimate-m…
gurusainath Jun 11, 2024
32d5ab8
Merge branch 'estimate-module-cycle-analytics' of gurusainath:makepla…
gurusainath Jun 11, 2024
183a184
chore: module points serializer
NarayanBavisetti Jun 11, 2024
b327873
Merge branch 'estimate-module-cycle-analytics' of gurusainath:makepla…
gurusainath Jun 11, 2024
9a556ad
chore: added fields in serializer
NarayanBavisetti Jun 11, 2024
d620e72
chore: module state estimate points
gurusainath Jun 11, 2024
498246c
dev: resolved merge conflicts
gurusainath Jun 11, 2024
e0f0f07
dev: updated module analytics
gurusainath Jun 11, 2024
08f086f
dev: updated hover description on the burndown
gurusainath Jun 11, 2024
9b90038
Merge branch 'develop' of gurusainath:makeplane/plane into estimate-m…
gurusainath Jun 11, 2024
257054d
dev: UI and module total percentage validation
gurusainath Jun 11, 2024
bfb1b09
chore: estimate points structure change
NarayanBavisetti Jun 11, 2024
551569a
Merge branch 'estimate-module-cycle-analytics' of github.com:makeplan…
NarayanBavisetti Jun 11, 2024
1c376f1
chore: module burndown
NarayanBavisetti Jun 11, 2024
e768041
chore: key values changed
NarayanBavisetti Jun 11, 2024
4df4f25
chore: cycle progress snapshot
NarayanBavisetti Jun 12, 2024
b774cb5
chore: updated module estimate points
gurusainath Jun 12, 2024
1065b38
chore: cycle detail endpoint
NarayanBavisetti Jun 12, 2024
b61efbd
chore: progress snapshot payload change
NarayanBavisetti Jun 12, 2024
f5f7fae
chore: resolved merge conflicts
gurusainath Jun 12, 2024
350ac3f
Merge branch 'estimate-module-cycle-analytics' of gurusainath:makepla…
gurusainath Jun 12, 2024
aa6ec67
chore: updated issue and point dropdown in active cycle
gurusainath Jun 12, 2024
2db70b3
chore: optimized grouped issues count in cycle and module
gurusainath Jun 12, 2024
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
Prev Previous commit
Next Next commit
chore: cycle detail endpoint
  • Loading branch information
NarayanBavisetti committed Jun 12, 2024
commit 1065b38956172355cef5f3d1e40532c1266fab4b
170 changes: 85 additions & 85 deletions apiserver/plane/app/views/cycle/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,101 +380,101 @@ def list(self, request, slug, project_id):
estimate__type="points",
).exists()

data[0]["estimate_distribution"] = {}
if estimate_type:
assignee_distribution = (
Issue.objects.filter(
issue_cycle__cycle_id=data[0]["id"],
workspace__slug=slug,
project_id=project_id,
)
.annotate(display_name=F("assignees__display_name"))
.annotate(assignee_id=F("assignees__id"))
.annotate(avatar=F("assignees__avatar"))
.values("display_name", "assignee_id", "avatar")
.annotate(
total_estimates=Sum(
Cast("estimate_point__value", IntegerField())
if data:
data[0]["estimate_distribution"] = {}
if estimate_type:
assignee_distribution = (
Issue.objects.filter(
issue_cycle__cycle_id=data[0]["id"],
workspace__slug=slug,
project_id=project_id,
)
)
.annotate(
completed_estimates=Sum(
Cast("estimate_point__value", IntegerField()),
filter=Q(
completed_at__isnull=False,
archived_at__isnull=True,
is_draft=False,
),
.annotate(display_name=F("assignees__display_name"))
.annotate(assignee_id=F("assignees__id"))
.annotate(avatar=F("assignees__avatar"))
.values("display_name", "assignee_id", "avatar")
.annotate(
total_estimates=Sum(
Cast("estimate_point__value", IntegerField())
)
)
)
.annotate(
pending_estimates=Sum(
Cast("estimate_point__value", IntegerField()),
filter=Q(
completed_at__isnull=True,
archived_at__isnull=True,
is_draft=False,
),
.annotate(
completed_estimates=Sum(
Cast("estimate_point__value", IntegerField()),
filter=Q(
completed_at__isnull=False,
archived_at__isnull=True,
is_draft=False,
),
)
)
.annotate(
pending_estimates=Sum(
Cast("estimate_point__value", IntegerField()),
filter=Q(
completed_at__isnull=True,
archived_at__isnull=True,
is_draft=False,
),
)
)
.order_by("display_name")
)
.order_by("display_name")
)

label_distribution = (
Issue.objects.filter(
issue_cycle__cycle_id=data[0]["id"],
workspace__slug=slug,
project_id=project_id,
)
.annotate(label_name=F("labels__name"))
.annotate(color=F("labels__color"))
.annotate(label_id=F("labels__id"))
.values("label_name", "color", "label_id")
.annotate(
total_estimates=Sum(
Cast("estimate_point__value", IntegerField())
label_distribution = (
Issue.objects.filter(
issue_cycle__cycle_id=data[0]["id"],
workspace__slug=slug,
project_id=project_id,
)
)
.annotate(
completed_estimates=Sum(
Cast("estimate_point__value", IntegerField()),
filter=Q(
completed_at__isnull=False,
archived_at__isnull=True,
is_draft=False,
),
.annotate(label_name=F("labels__name"))
.annotate(color=F("labels__color"))
.annotate(label_id=F("labels__id"))
.values("label_name", "color", "label_id")
.annotate(
total_estimates=Sum(
Cast("estimate_point__value", IntegerField())
)
)
)
.annotate(
pending_estimates=Sum(
Cast("estimate_point__value", IntegerField()),
filter=Q(
completed_at__isnull=True,
archived_at__isnull=True,
is_draft=False,
),
.annotate(
completed_estimates=Sum(
Cast("estimate_point__value", IntegerField()),
filter=Q(
completed_at__isnull=False,
archived_at__isnull=True,
is_draft=False,
),
)
)
)
.order_by("label_name")
)
data[0]["estimate_distribution"] = {
"assignees": assignee_distribution,
"labels": label_distribution,
"completion_chart": {},
}

if data[0]["start_date"] and data[0]["end_date"]:
data[0]["estimate_distribution"]["completion_chart"] = (
burndown_plot(
queryset=queryset.first(),
slug=slug,
project_id=project_id,
plot_type="points",
cycle_id=data[0]["id"],
.annotate(
pending_estimates=Sum(
Cast("estimate_point__value", IntegerField()),
filter=Q(
completed_at__isnull=True,
archived_at__isnull=True,
is_draft=False,
),
)
)
.order_by("label_name")
)
data[0]["estimate_distribution"] = {
"assignees": assignee_distribution,
"labels": label_distribution,
"completion_chart": {},
}

if data[0]["start_date"] and data[0]["end_date"]:
data[0]["estimate_distribution"]["completion_chart"] = (
burndown_plot(
queryset=queryset.first(),
slug=slug,
project_id=project_id,
plot_type="points",
cycle_id=data[0]["id"],
)
)

if data:
assignee_distribution = (
Issue.objects.filter(
issue_cycle__cycle_id=data[0]["id"],
Expand Down Expand Up @@ -908,7 +908,7 @@ def retrieve(self, request, slug, project_id, pk):
if data["start_date"] and data["end_date"]:
data["estimate_distribution"]["completion_chart"] = (
burndown_plot(
queryset=queryset.first(),
queryset=queryset,
slug=slug,
project_id=project_id,
plot_type="points",
Expand Down
Loading