diff --git a/.changeset/wicked-singers-push.md b/.changeset/wicked-singers-push.md new file mode 100644 index 0000000000..3c34a959ed --- /dev/null +++ b/.changeset/wicked-singers-push.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-org': patch +--- + +Fix OwnershipCard links to support namespaced owners diff --git a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.tsx b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.tsx index 83768f1513..32a2061297 100644 --- a/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.tsx +++ b/plugins/org/src/components/Cards/OwnershipCard/OwnershipCard.tsx @@ -20,6 +20,7 @@ import { isOwnerOf, useEntity, catalogRouteRef, + formatEntityRefTitle, } from '@backstage/plugin-catalog-react'; import { BackstageTheme, genPageTheme } from '@backstage/theme'; import { @@ -117,7 +118,7 @@ const getQueryParams = ( owner: Entity, selectedEntity: EntityTypeProps, ): string => { - const ownerName = owner.metadata.name; + const ownerName = formatEntityRefTitle(owner, { defaultKind: 'group' }); const { kind, type } = selectedEntity; const queryParams = qs.stringify({ filters: {