diff --git a/web/components/analytics/scope-and-demand/scope-and-demand.tsx b/web/components/analytics/scope-and-demand/scope-and-demand.tsx index 2e9756d67..ede3a8e25 100644 --- a/web/components/analytics/scope-and-demand/scope-and-demand.tsx +++ b/web/components/analytics/scope-and-demand/scope-and-demand.tsx @@ -45,7 +45,7 @@ export const ScopeAndDemand: React.FC = (props) => { // scope data const pendingIssues = defaultAnalytics?.pending_issue_user ?? []; - const pendingUnAssignedIssues = pendingIssues?.filter((issue) => issue.assignees__id === null); + const pendingUnAssignedIssuesUser = pendingIssues?.find((issue) => issue.assignees__id === null); const pendingAssignedIssues = pendingIssues?.filter((issue) => issue.assignees__id !== null); return ( @@ -56,7 +56,7 @@ export const ScopeAndDemand: React.FC = (props) => {
= ({ pendingUnAssignedIssues, pendingAssignedIssues }) => ( +export const AnalyticsScope: React.FC = ({ pendingUnAssignedIssuesUser, pendingAssignedIssues }) => (
Pending issues
-
- Unassigned: {pendingUnAssignedIssues.length} -
+ {pendingUnAssignedIssuesUser && ( +
+ Unassigned: {pendingUnAssignedIssuesUser.count} +
+ )}
{pendingAssignedIssues && pendingAssignedIssues.length > 0 ? (