diff --git a/src/components/common/TicketEditor/TicketEditor.tsx b/src/components/common/TicketEditor/TicketEditor.tsx index 5168e300..04d287a9 100644 --- a/src/components/common/TicketEditor/TicketEditor.tsx +++ b/src/components/common/TicketEditor/TicketEditor.tsx @@ -36,20 +36,12 @@ const TicketEditor = ({ ticketData, websocketSessionId }: TicketEditorProps) => const { main } = useStores(); useEffect(() => { - const fetchTicketDetails = async () => { - try { - const ticket = await main.getTicketDetails(ticketData.uuid); - if (ticket) { - setDescription(ticket.description || ''); - setName(ticket.name || 'Ticket'); - } - } catch (error) { - console.error('Error fetching ticket details:', error); - } - }; - - fetchTicketDetails(); - }, [ticketData.uuid, main]); + const storedTicket = phaseTicketStore.getTicket(ticketData.uuid); + if (storedTicket) { + setDescription(storedTicket.description || ''); + setName(storedTicket.name || 'Ticket'); + } + }, [ticketData.uuid]); const addUpdateSuccessToast = () => { setToasts([ diff --git a/src/people/widgetViews/PhasePlannerView.tsx b/src/people/widgetViews/PhasePlannerView.tsx index cbc5b6ee..dab28e24 100644 --- a/src/people/widgetViews/PhasePlannerView.tsx +++ b/src/people/widgetViews/PhasePlannerView.tsx @@ -151,6 +151,8 @@ const PhasePlannerView: React.FC = () => { if (ticket.UUID) { ticket.uuid = ticket.UUID; } + + phaseTicketStore.addTicket(ticket); parsedTicketData.push({ ...ticket }); } setFeatureData(feature);