SAP / open-ux-odata

Enable community collaboration to jointly promote and facilitate best in class framework and tooling capabilities when working with OData services.
Apache License 2.0
51 stars 10 forks source link

BUG - Data in @Communication.Contact does not work with mockserver version 2.1.71 #482

Closed mengmengh2022 closed 1 year ago

mengmengh2022 commented 1 year ago

Description

With @sap-ux/ui5-middleware-fe-mockserve version 2.1.71, the data defined with @Communication.Contact cannot be displayed. With -fe-mockserve version 2.1.43 it is working.

We use the following annotation for build this Contact:

      { $Type : 'UI.DataFieldForAnnotation',
        Target: 'owner/@Communication.Contact',
        ....
      }
      ...
        Communication.Contact  : {
          fn    : displayName,
          email : [{
            type    : #work,
            address : email
          }],
          org   : department
        },

Screenshots

The errors are: image

Root Cause Analysis

Problem

{describe the problem}

Fix

{describe the fix}

Why was it missed

{Some explanation why this issue might have been missed during normal development/testing cycle}

How can we avoid this

{if we don’t want to see this type of issues anymore what we should do to prevent}

nlunets commented 1 year ago

Hi @mengmengh2022 this is probably related to your data and how owner is defined in the metadata, is there a referential constraint defined for it ?

mengmengh2022 commented 1 year ago

Hi Nicolas, what do you mean by "referential constraint"? How should we modify the data? What I also wonder, is why it is working with the fe-mockserver version 2.1.43.

nlunets commented 1 year ago

By referential constraint i mean the tag that is defined in your metadata in some case. In general the problem you describe seems to come from an incorrectly defined mockdata, so you should check whether or not a stupid algorithm might find your data (following your keys / referentiel constraints)

mengmengh2022 commented 1 year ago

Hi Nicolas, we can not proceed with this information. Could you please provide more hints or provide a working example of mockdata for contact card?

Thanks and best regards, Mengmeng

nlunets commented 1 year ago

@mengmengh2022 can you retry ? There was a fix recently for nullable properties that might be related to what you saw before

mengmengh2022 commented 1 year ago

Hi Nicolas, thanks for the update. It is working with version 2.1.87.

Thanks and best regards, Mengmeng