web-seven / backstage-plugins

IDP Plugins for Backstage
0 stars 0 forks source link

πŸ› EntityValuePicker: plugin fails to recognize single entity #39

Closed art10m closed 2 months ago

art10m commented 2 months ago

EntityValuePicker from @web-seven/backstage-plugin-scaffolder-extensions does not work when only one entity of a given kind exists in the Backstage catalog.

Issue details:

When using the EntityValuePicker plugin in my Backstage frontend application, it fails to work properly if there is only one entity of the specified kind in the catalog. The selected value seems to be captured, but the form doesn't recognize it. However, when I add a second entity of the same kind, the plugin starts functioning as expected.

Example Configuration:

environment:
  title: Environment
  type: string
  ui:field: EntityValuePicker
  ui:options:
    catalogFilter:
      - kind: Environment
    valuesSchema:
      name: metadata.name
    template: "{{ name }}"

In the above example, if only one Environment entity is present, the plugin doesn't register it correctly. Once a second entity of the same kind is added, it starts working.

Todo:

evghen1 commented 2 months ago

@art10m bugfix published in version 0.0.12: https://www.npmjs.com/package/@web-seven/backstage-plugin-scaffolder-extensions/v/0.0.12