Skip to content

Commit

Permalink
fix(core): use from ticket title for "blocked by"
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-nfc committed Aug 30, 2024
1 parent 6a52730 commit 96ed198
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/core/models/ticket/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,15 @@ def related_tickets(self) -> list(dict()):


how_related:str = str(related_ticket.get_how_related_display()).lower()
ticket_title: str = related_ticket.to_ticket_id.title


if related_ticket.to_ticket_id_id == self.id:

if str(related_ticket.get_how_related_display()).lower() == 'blocks':

how_related = 'blocked by'
ticket_title = related_ticket.from_ticket_id.title

elif str(related_ticket.get_how_related_display()).lower() == 'blocked by':

Expand All @@ -674,7 +676,7 @@ def related_tickets(self) -> list(dict()):
{
'id': related_ticket.id,
'type': related_ticket.to_ticket_id.get_ticket_type_display().lower(),
'title': related_ticket.to_ticket_id.title,
'title': ticket_title,
'how_related': how_related.replace(' ', '_'),
'icon_filename': str('icons/ticket/ticket_' + how_related.replace(' ', '_') + '.svg')
}
Expand Down

0 comments on commit 96ed198

Please sign in to comment.