diff --git a/apiserver/plane/app/views/project/base.py b/apiserver/plane/app/views/project/base.py index 50435e3a8..d8791ae9b 100644 --- a/apiserver/plane/app/views/project/base.py +++ b/apiserver/plane/app/views/project/base.py @@ -185,7 +185,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet): .annotate( total_issues=Issue.issue_objects.filter( project_id=self.kwargs.get("pk"), - parent__isnull=True, ) .order_by() .annotate(count=Func(F("id"), function="Count")) @@ -204,7 +203,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet): archived_issues=Issue.objects.filter( project_id=self.kwargs.get("pk"), archived_at__isnull=False, - parent__isnull=True, ) .order_by() .annotate(count=Func(F("id"), function="Count")) @@ -224,7 +222,6 @@ class ProjectViewSet(WebhookMixin, BaseViewSet): draft_issues=Issue.objects.filter( project_id=self.kwargs.get("pk"), is_draft=True, - parent__isnull=True, ) .order_by() .annotate(count=Func(F("id"), function="Count")) diff --git a/web/components/headers/cycle-issues.tsx b/web/components/headers/cycle-issues.tsx index ac59287e3..c347fb62f 100644 --- a/web/components/headers/cycle-issues.tsx +++ b/web/components/headers/cycle-issues.tsx @@ -147,8 +147,8 @@ export const CycleIssuesHeader: React.FC = observer(() => { currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole); const issueCount = cycleDetails - ? issueFilters?.displayFilters?.sub_issue && cycleDetails?.sub_issues - ? cycleDetails.total_issues + cycleDetails?.sub_issues + ? !issueFilters?.displayFilters?.sub_issue && cycleDetails?.sub_issues + ? cycleDetails.total_issues - cycleDetails?.sub_issues : cycleDetails.total_issues : undefined; @@ -227,9 +227,7 @@ export const CycleIssuesHeader: React.FC = observer(() => { className="ml-1.5 flex-shrink-0 truncate" placement="bottom-start" > - {currentProjectCycleIds?.map((cycleId) => ( - - ))} + {currentProjectCycleIds?.map((cycleId) => )} } /> diff --git a/web/components/headers/module-issues.tsx b/web/components/headers/module-issues.tsx index 13d81e49b..04b7f04b2 100644 --- a/web/components/headers/module-issues.tsx +++ b/web/components/headers/module-issues.tsx @@ -147,8 +147,8 @@ export const ModuleIssuesHeader: React.FC = observer(() => { currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole); const issueCount = moduleDetails - ? issueFilters?.displayFilters?.sub_issue && moduleDetails.sub_issues - ? moduleDetails.total_issues + moduleDetails.sub_issues + ? !issueFilters?.displayFilters?.sub_issue && moduleDetails.sub_issues + ? moduleDetails.total_issues - moduleDetails.sub_issues : moduleDetails.total_issues : undefined; @@ -227,9 +227,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => { className="ml-1.5 flex-shrink-0" placement="bottom-start" > - {projectModuleIds?.map((moduleId) => ( - - ))} + {projectModuleIds?.map((moduleId) => )} } /> diff --git a/web/components/headers/project-archives.tsx b/web/components/headers/project-archives.tsx index 5cee12bdf..6e5638c71 100644 --- a/web/components/headers/project-archives.tsx +++ b/web/components/headers/project-archives.tsx @@ -27,8 +27,8 @@ export const ProjectArchivesHeader: FC = observer(() => { const { isMobile } = usePlatformOS(); const issueCount = currentProjectDetails - ? issueFilters?.displayFilters?.sub_issue - ? currentProjectDetails.archived_issues + currentProjectDetails.archived_sub_issues + ? !issueFilters?.displayFilters?.sub_issue && currentProjectDetails.archived_sub_issues + ? currentProjectDetails.archived_issues - currentProjectDetails.archived_sub_issues : currentProjectDetails.archived_issues : undefined; diff --git a/web/components/headers/project-draft-issues.tsx b/web/components/headers/project-draft-issues.tsx index a9f5a93f7..deb8c72ba 100644 --- a/web/components/headers/project-draft-issues.tsx +++ b/web/components/headers/project-draft-issues.tsx @@ -78,8 +78,8 @@ export const ProjectDraftIssueHeader: FC = observer(() => { ); const issueCount = currentProjectDetails - ? issueFilters?.displayFilters?.sub_issue - ? currentProjectDetails.draft_issues + currentProjectDetails.draft_sub_issues + ? !issueFilters?.displayFilters?.sub_issue && currentProjectDetails.draft_sub_issues + ? currentProjectDetails.draft_issues - currentProjectDetails.draft_sub_issues : currentProjectDetails.draft_issues : undefined; diff --git a/web/components/headers/project-issues.tsx b/web/components/headers/project-issues.tsx index 793dcbd76..01f034c7f 100644 --- a/web/components/headers/project-issues.tsx +++ b/web/components/headers/project-issues.tsx @@ -104,8 +104,8 @@ export const ProjectIssuesHeader: React.FC = observer(() => { currentProjectRole && [EUserProjectRoles.ADMIN, EUserProjectRoles.MEMBER].includes(currentProjectRole); const issueCount = currentProjectDetails - ? issueFilters?.displayFilters?.sub_issue - ? currentProjectDetails?.total_issues + currentProjectDetails?.sub_issues + ? !issueFilters?.displayFilters?.sub_issue && currentProjectDetails?.sub_issues + ? currentProjectDetails?.total_issues - currentProjectDetails?.sub_issues : currentProjectDetails?.total_issues : undefined;