diff --git a/ui/src/components/IssueProperties.tsx b/ui/src/components/IssueProperties.tsx index ced81b23..8b5fdfcb 100644 --- a/ui/src/components/IssueProperties.tsx +++ b/ui/src/components/IssueProperties.tsx @@ -44,6 +44,7 @@ interface IssuePropertiesProps { issue: Issue; onUpdate: (data: Record) => void; inline?: boolean; + childIssues?: Issue[]; } function PropertyRow({ label, children }: { label: string; children: React.ReactNode }) { @@ -117,7 +118,7 @@ function PropertyPicker({ ); } -export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProps) { +export function IssueProperties({ issue, onUpdate, inline, childIssues }: IssuePropertiesProps) { const { selectedCompanyId } = useCompany(); const queryClient = useQueryClient(); const companyId = issue.companyId ?? selectedCompanyId; @@ -560,17 +561,6 @@ export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProp {projectContent} - {issue.parentId && ( - - - {issue.ancestors?.[0]?.title ?? issue.parentId.slice(0, 8)} - - - )} - {issue.requestDepth > 0 && ( {issue.requestDepth} @@ -615,6 +605,52 @@ export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProp {timeAgo(issue.updatedAt)} + + {(issue.parentId || (childIssues && childIssues.length > 0)) && ( + <> + +
+ {issue.parentId && ( +
+

Parent task

+
+ {issue.ancestors?.[0] != null && ( +
+ +
+ )} + + {issue.ancestors?.[0]?.title ?? issue.parentId.slice(0, 8)} + +
+
+ )} + {childIssues && childIssues.length > 0 && ( +
+

Sub-tasks

+
+ {childIssues.map((child) => ( +
+
+ +
+ + {child.title} + +
+ ))} +
+
+ )} +
+ + )} ); } diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsx index d16a3103..31810921 100644 --- a/ui/src/pages/IssueDetail.tsx +++ b/ui/src/pages/IssueDetail.tsx @@ -985,7 +985,7 @@ export function IssueDetail() { useEffect(() => { if (issue) { openPanel( - updateIssue.mutate(data)} /> + updateIssue.mutate(data)} childIssues={childIssues} /> ); } return () => closePanel(); @@ -1699,7 +1699,7 @@ export function IssueDetail() {
- updateIssue.mutate(data)} inline /> + updateIssue.mutate(data)} inline childIssues={childIssues} />