forked from github/plane
feat: sub issue toggle (#464)
This commit is contained in:
parent
9339138c0e
commit
025c8b3835
@ -175,12 +175,20 @@ class IssueViewSet(BaseViewSet):
|
|||||||
def list(self, request, slug, project_id):
|
def list(self, request, slug, project_id):
|
||||||
try:
|
try:
|
||||||
filters = issue_filters(request.query_params, "GET")
|
filters = issue_filters(request.query_params, "GET")
|
||||||
|
show_sub_issues = request.GET.get("show_sub_issues", "true")
|
||||||
|
|
||||||
issue_queryset = (
|
issue_queryset = (
|
||||||
self.get_queryset()
|
self.get_queryset()
|
||||||
.order_by(request.GET.get("order_by", "created_at"))
|
.order_by(request.GET.get("order_by", "created_at"))
|
||||||
.filter(**filters)
|
.filter(**filters)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
issue_queryset = (
|
||||||
|
issue_queryset
|
||||||
|
if show_sub_issues == "true"
|
||||||
|
else issue_queryset.filter(parent__isnull=True)
|
||||||
|
)
|
||||||
|
|
||||||
issues = IssueSerializer(issue_queryset, many=True).data
|
issues = IssueSerializer(issue_queryset, many=True).data
|
||||||
|
|
||||||
## Grouping the results
|
## Grouping the results
|
||||||
|
Loading…
Reference in New Issue
Block a user