forked from github/plane
fix: sub issue progress indicator fix (#1847)
This commit is contained in:
parent
ac6d2b0139
commit
a3d99100ee
@ -93,13 +93,14 @@ export const SubIssuesList: FC<Props> = ({ parentIssue, user, disabled = false }
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const completedSubIssues = subIssuesResponse
|
const completedSubIssue = subIssuesResponse?.state_distribution.completed ?? 0;
|
||||||
? subIssuesResponse.state_distribution.completed +
|
const cancelledSubIssue = subIssuesResponse?.state_distribution.cancelled ?? 0;
|
||||||
subIssuesResponse.state_distribution.cancelled
|
|
||||||
: 0;
|
const totalCompletedSubIssues = completedSubIssue + cancelledSubIssue;
|
||||||
|
|
||||||
const totalSubIssues = subIssuesResponse ? subIssuesResponse.sub_issues.length : 0;
|
const totalSubIssues = subIssuesResponse ? subIssuesResponse.sub_issues.length : 0;
|
||||||
|
|
||||||
const completionPercentage = (completedSubIssues / totalSubIssues) * 100;
|
const completionPercentage = (totalCompletedSubIssues / totalSubIssues) * 100;
|
||||||
|
|
||||||
const isNotAllowed = memberRole.isGuest || memberRole.isViewer || disabled;
|
const isNotAllowed = memberRole.isGuest || memberRole.isViewer || disabled;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user