Fix parent ticket assignment and display
linter / quality (pull_request) Successful in 1m15s
tests / ci (8.4) (pull_request) Successful in 1m35s

This commit is contained in:
2026-05-24 15:24:29 +00:00
parent ffe5939628
commit ce260bfd46
9 changed files with 227 additions and 1 deletions
+42 -1
View File
@@ -83,6 +83,15 @@ const canViewAuthor = computed(
() => props.project.show_author || props.canManageProject,
);
const currentParentTicket = computed(
() =>
props.ticket.parent_ticket ??
props.parentTicketOptions.find(
(parentTicket) => parentTicket.id === props.ticket.parent_ticket_id,
) ??
null,
);
const defaultBranchRepositoryConnectionId = computed(() =>
String(
linkedRepositoryConnections.value.find(
@@ -1521,7 +1530,10 @@ const formatDateTime = (value: string): string => {
</CardContent>
</Card>
<Card class="h-fit">
<Card
v-if="ticket.ticket_type?.is_parent"
class="h-fit"
>
<CardHeader>
<CardTitle>Child tickets</CardTitle>
<CardDescription>
@@ -1547,6 +1559,35 @@ const formatDateTime = (value: string): string => {
</CardContent>
</Card>
<Card
v-else-if="currentParentTicket !== null"
class="h-fit"
>
<CardHeader>
<CardTitle>Parent ticket</CardTitle>
<CardDescription>
This ticket belongs to the parent shown here.
</CardDescription>
</CardHeader>
<CardContent>
<Link
:href="showTicket({
project: project.id,
ticket: currentParentTicket.id,
})"
class="border-border hover:border-primary/60 block rounded-xl border px-4 py-4 transition"
>
<div class="font-medium">
{{ currentParentTicket.ticket_key }}
</div>
<div class="text-muted-foreground mt-1 text-sm">
{{ currentParentTicket.title }}
</div>
</Link>
</CardContent>
</Card>
<Card class="h-fit">
<CardHeader>
<CardTitle>Worklog</CardTitle>