Nested fields not showing, returns null

Feature(s) impacted

flattened fields

Observed behavior

when looking at the collection, flattened fields show correctly, when clicking on any and switching to details tab, the flattened fields show null and receive null as logs show

Expected behavior

details tab should show the flattened fields values

Context

  • Project name: WescoverContentAdmin
  • Team name: Operators
  • Environment name: Development | nimrodmaltz
  • Agent type & version: forest-express-mongoose: 8.7.4
  • Recent changes made on your end if any: added fieldsToFlatten attribute

Hello,

i have found a bug and i cant seem to debug it fully.
profile is a nested field and is showing correctly as shown:

when clicking on any document and going to details tab the nested fields return null:

Untitled4

furthermore, when returning to the collection tab the nested fields data disappears as well.

any help debugging this would be greatly appreciated.
thanks in advance,
nimrod

Hi @nmz :wave: Have you got any error logs on your browser console?
Or on your Agent console?
Can you share with us the response payload of the details request?
:pray:

hello @Arnaud_Moncel ,

no errors,

there are three responses, two payloads are null, the third is:

{"data":[{"type":"Buyer","id":"6283c09fcb8e1532fdf8524b","attributes":{"_id":"6283c09fcb8e1532fdf8524b","profile@@@customizationInterestLevel":null,"profile@@@projectTypes":null,"profile@@@sourcing@@@statusModifiedAt":null,"profile@@@sourcing@@@status":null}}]}

i hope this helps,
thanks,
nimrod

Have you override the GET Buyer route? It can be explain the missing data you have here.
We have tested with a model like this:

[...]
    profile: {
      customizationInterestLevel: Number,
      projectTypes: [String],
      sourcing: {
        status: { type: String, enum: ['active', 'inactive'] },
        statusModifiedAt: { type: Date, default: Date.now},
      }
    }
[...]

and it work on our side.

hello,

yes, we have nested fields flattened on another collection and it works just fine.
i am unsure whats the difference…
there are no get methods overridden in the routes file, only post methods for smart actions.

thank u,
nimrod

Hello @nmz :wave:

We have just released a fix, can you upgrade forest-express-mongoose to version 8.7.9 please ? Tell me if it works properly :slight_smile:

For every one else reading this thread, the issue was linked to the flattener used in conjunction with smart action restricted to segments. From version 8.7.9, they should work properly together.

Steve.

1 Like

hi steve,

will look once its up. 8.7.6 is currently latest…

thanks,
nimrod

Sorry @nmz, version 8.7.6 is actually the version which contains the fix !

Tell me if everything works correctly now.

Steve.

hi steve,

8.7.6 fixes the issue

thank u,
nimrod
nimr

1 Like