From 18e84c98224f46668ca3e082e39d06bc0dcd4ce5 Mon Sep 17 00:00:00 2001 From: Fabio Valente <8777512+fabiojvalente@users.noreply.github.com> Date: Wed, 19 Feb 2025 15:18:45 +0000 Subject: [PATCH] fix(MyGroupsSidebarItem): Return spec.profile field on getEntities Signed-off-by: Fabio Valente <8777512+fabiojvalente@users.noreply.github.com> --- .changeset/shaggy-stingrays-check.md | 5 +++++ .../MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx | 4 ++-- .../components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/shaggy-stingrays-check.md diff --git a/.changeset/shaggy-stingrays-check.md b/.changeset/shaggy-stingrays-check.md new file mode 100644 index 0000000000..74e0013224 --- /dev/null +++ b/.changeset/shaggy-stingrays-check.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-org': patch +--- + +Fixed missing spec.profile field on MyGroupsSidebarItem.tsx so the group spec.profile.displayName is shown on the sidebar" diff --git a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx index c870d58cc1..33a436b65c 100644 --- a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx +++ b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.test.tsx @@ -256,7 +256,7 @@ describe('MyGroupsSidebarItem Test', () => { 'relations.hasMember': 'user:default/guest', }, ], - fields: ['metadata', 'kind'], + fields: ['metadata', 'kind', 'spec.profile'], }); }); }); @@ -301,7 +301,7 @@ describe('MyGroupsSidebarItem Test', () => { 'spec.type': 'team', }, ], - fields: ['metadata', 'kind'], + fields: ['metadata', 'kind', 'spec.profile'], }); }); }); diff --git a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx index 8292455115..21d3608f93 100644 --- a/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx +++ b/plugins/org/src/components/MyGroupsSidebarItem/MyGroupsSidebarItem.tsx @@ -69,7 +69,7 @@ export const MyGroupsSidebarItem = (props: { ...(filter ?? {}), }, ], - fields: ['metadata', 'kind'], + fields: ['metadata', 'kind', 'spec.profile'], }); return response.items; }, []);