Aam-Digital / ndb-core

Easy-to-use case management web app for NGOs anywhere in the world.
http://www.aam-digital.com
GNU General Public License v3.0
47 stars 14 forks source link

EventNote entities are missing attributes from custom Note attributes #2405

Open sleidig opened 3 weeks ago

sleidig commented 3 weeks ago

To Reproduce

  1. Activate a custom "relatedEntities" field for the Note Entity in config:
    "entity:Note": {
      "attributes": {
        "relatedEntities": {
          "label": "Related records",
          "dataType": "entity",
          "isArray": true,
          "additional": [
            "Child",
            "School"
          ]
        }
      }
    },
  2. Use the "record attendance" view to create a new "EventNote" entity
  3. Open the Note Details view of that EventNote record (e.g. by going to Notes list, enabling "Include events" toggle in the three-dot menu and clicking on the record for the newly created event)
  4. See console error "Cannot read properties of undefined (reading 'value')"

This is resolved if you copy the "entity:Note" config and add the same as "entity:EventNote" to the config doc additionally.

Expected behavior "EventNote" should extend the "Note" entity type - including its customized attributes ...

sentry-io[bot] commented 3 weeks ago

Sentry Issue: AAM-DIGITAL-5G6