@@ -15,9 +15,11 @@ import { SlideoutMenu } from '@openmetadata/ui-core-components';
1515import { ReactNode , useEffect , useLayoutEffect , useState } from 'react' ;
1616import { useAlertStore } from '../../hooks/useAlertStore' ;
1717import { EntityData } from '../../pages/TasksPage/TasksPage.interface' ;
18+ import { getGlossaryTermByFQN } from '../../rest/glossaryAPI' ;
1819import AlertBar from '../AlertBar/AlertBar' ;
1920import EntitySummaryPanel from '../Explore/EntitySummaryPanel/EntitySummaryPanel.component' ;
2021import { EntityDetailsObjectInterface } from '../Explore/ExplorePage.interface' ;
22+ import { isValidUUID } from './utils/graphBuilders' ;
2123
2224const PANEL_WIDTH = 576 ;
2325
@@ -46,6 +48,8 @@ export const OntologyEntityPanel = ({
4648 message : string | JSX . Element ;
4749 type : 'success' | 'error' ;
4850 } > ( { message : '' , open : false , type : 'success' } ) ;
51+ const [ resolvedDetails , setResolvedDetails ] =
52+ useState < EntityDetailsObjectInterface > ( entityDetails ) ;
4953
5054 // Intercept global alerts when the panel is open so they show inside
5155 // the slideout instead of on the background page via PageLayoutV1.
@@ -73,6 +77,29 @@ export const OntologyEntityPanel = ({
7377 return ( ) => clearTimeout ( timer ) ;
7478 } , [ localToast ] ) ;
7579
80+ // Data-mode nodes built by buildGraphFromCounts use the FQN as the graph id
81+ // instead of a real UUID. Fetch the term by FQN to get the actual UUID so
82+ // PATCH operations in EntitySummaryPanel receive a valid id.
83+ useEffect ( ( ) => {
84+ const id = entityDetails . details ?. id ?? '' ;
85+ const fqn = entityDetails . details ?. fullyQualifiedName ?? '' ;
86+
87+ if ( isValidUUID ( id ) || ! fqn ) {
88+ setResolvedDetails ( entityDetails ) ;
89+
90+ return ;
91+ }
92+
93+ getGlossaryTermByFQN ( fqn )
94+ . then ( ( term ) => {
95+ setResolvedDetails ( {
96+ ...entityDetails ,
97+ details : { ...entityDetails . details , id : term . id ?? id } ,
98+ } ) ;
99+ } )
100+ . catch ( ( ) => setResolvedDetails ( entityDetails ) ) ;
101+ } , [ entityDetails ] ) ;
102+
76103 return (
77104 < SlideoutMenu
78105 isDismissable
@@ -100,7 +127,7 @@ export const OntologyEntityPanel = ({
100127 < EntitySummaryPanel
101128 isSideDrawer
102129 afterEntityUpdate = { afterEntityUpdate }
103- entityDetails = { entityDetails }
130+ entityDetails = { resolvedDetails }
104131 handleClosePanel = { onClose }
105132 ontologyExplorerRelationsSlot = { ontologyRelationsSlot }
106133 panelPath = { panelPath }
0 commit comments