dev: ungrouped list

This commit is contained in:
pablohashescobar 2024-02-29 13:10:18 +05:30
parent db31644313
commit 880bc00666
4 changed files with 25 additions and 22 deletions

View File

@ -757,6 +757,9 @@ class CycleIssueViewSet(WebhookMixin, BaseViewSet):
# Group by
group_by = request.GET.get("group_by", False)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# List Paginate
if not group_by:
@ -768,9 +771,6 @@ class CycleIssueViewSet(WebhookMixin, BaseViewSet):
),
)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# Group paginate
return self.paginate(
request=request,

View File

@ -145,6 +145,9 @@ class IssueListEndpoint(BaseAPIView):
# Group by
group_by = request.GET.get("group_by", False)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# List Paginate
if not group_by:
@ -156,9 +159,6 @@ class IssueListEndpoint(BaseAPIView):
),
)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# Group paginate
return self.paginate(
request=request,
@ -253,6 +253,11 @@ class IssueViewSet(WebhookMixin, BaseViewSet):
# Group by
group_by = request.GET.get("group_by", False)
# issue queryset
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# List Paginate
if not group_by:
return self.paginate(
@ -263,9 +268,6 @@ class IssueViewSet(WebhookMixin, BaseViewSet):
),
)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# Group paginate
return self.paginate(
request=request,
@ -1091,7 +1093,6 @@ class IssueLinkViewSet(BaseViewSet):
issue_link.delete()
return Response(status=status.HTTP_204_NO_CONTENT)
class BulkCreateIssueLabelsEndpoint(BaseAPIView):
def post(self, request, slug, project_id):
label_data = request.data.get("label_data", [])
@ -1243,6 +1244,10 @@ class IssueArchiveViewSet(BaseViewSet):
# Group by
group_by = request.GET.get("group_by", False)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# List Paginate
if not group_by:
return self.paginate(
@ -1253,9 +1258,6 @@ class IssueArchiveViewSet(BaseViewSet):
),
)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# Group paginate
return self.paginate(
request=request,
@ -1869,6 +1871,10 @@ class IssueDraftViewSet(BaseViewSet):
# Group by
group_by = request.GET.get("group_by", False)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# List Paginate
if not group_by:
return self.paginate(
@ -1879,9 +1885,6 @@ class IssueDraftViewSet(BaseViewSet):
),
)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# Group paginate
return self.paginate(
request=request,

View File

@ -491,6 +491,9 @@ class ModuleIssueViewSet(WebhookMixin, BaseViewSet):
# Group by
group_by = request.GET.get("group_by", False)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# List Paginate
if not group_by:
@ -502,9 +505,6 @@ class ModuleIssueViewSet(WebhookMixin, BaseViewSet):
),
)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# Group paginate
return self.paginate(
request=request,

View File

@ -569,6 +569,9 @@ class ProjectIssuesPublicEndpoint(BaseAPIView):
# Group by
group_by = request.GET.get("group_by", False)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# List Paginate
if not group_by:
@ -580,9 +583,6 @@ class ProjectIssuesPublicEndpoint(BaseAPIView):
),
)
issue_queryset = issue_queryset_grouper(
queryset=issue_queryset, field=group_by
)
# Group paginate
return self.paginate(
request=request,