fix user asset not comming in mydata and widget (#17234)

This commit is contained in:
Ashish Gupta 2024-07-30 19:27:19 +05:30 committed by GitHub
parent f52e93f88f
commit 3606d47a7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 8 deletions

View File

@ -206,7 +206,7 @@ const AssetsTabs = forwardRef(
return `(dataProducts.fullyQualifiedName:"${encodedFqn}")`;
case AssetsOfEntity.TEAM:
return `(owner.fullyQualifiedName:"${escapeESReservedCharacters(
return `(owners.fullyQualifiedName:"${escapeESReservedCharacters(
fqn
)}")`;

View File

@ -55,8 +55,8 @@ const MyDataWidgetInternal = ({
try {
const teamsIds = (currentUser.teams ?? []).map((team) => team.id);
const mergedIds = [
...teamsIds.map((id) => `owner.id:${id}`),
`owner.id:${currentUser.id}`,
...teamsIds.map((id) => `owners.id:${id}`),
`owners.id:${currentUser.id}`,
].join(' OR ');
const queryFilter = `(${mergedIds})`;

View File

@ -90,7 +90,7 @@ describe('MyDataWidget component', () => {
'',
1,
10,
'(owner.id:113)',
'(owners.id:113)',
'',
'',
'all'

View File

@ -226,7 +226,7 @@ describe('Test Teams Page', () => {
'',
0,
0,
'owner.id:f9578f16-363a-4788-80fb-d05816c9e169',
'owners.id:f9578f16-363a-4788-80fb-d05816c9e169',
'',
'',
'all'

View File

@ -200,7 +200,7 @@ const TeamsPage = () => {
``,
0,
0,
`owner.id:${selectedTeam.id}`,
`owners.id:${selectedTeam.id}`,
'',
'',
SearchIndex.ALL

View File

@ -78,8 +78,8 @@ const UserPage = () => {
const myDataQueryFilter = useMemo(() => {
const teamsIds = (userData.teams ?? []).map((team) => team.id);
const mergedIds = [
...teamsIds.map((id) => `owner.id:${id}`),
`owner.id:${userData.id}`,
...teamsIds.map((id) => `owners.id:${id}`),
`owners.id:${userData.id}`,
].join(' OR ');
return `(${mergedIds})`;