Smart field not available in list

Feature(s) impacted

Smart Fields

Observed behavior

Smart Field not available in fields list in forestadmin when created in backend.

But appears well in .forestadmin-schema

, {
      "field": "name_admin",
      "type": "String",
      "default_value": null,
      "enums": null,
      "integration": null,
      "is_filterable": false,
      "is_read_only": true,
      "is_required": false,
      "is_sortable": false,
      "is_virtual": true,
      "reference": null,
      "inverse_of": null,
      "widget": null,
      "validations": []
    }

Expected behavior

Smart Field available in list

Context

Code of smart field

class Forest::BestPractice
  include ForestLiana::Collection

  collection :BestPractice

  field :name_admin, type: 'String' do
    "#{object.name} - #{object.organisation.name}"
  end
end

in lib/forest_liana/collections/best_practice.rb

  • Project name: Lakaa
  • Team name: Lakaa
  • Environment name: Production
  • Agent type & version:
"liana": "forest-rails",
    "liana_version": "7.7.0",
    "stack": {
      "database_type": "postgresql",
      "orm_version": "7.0.4"
    }

Thanks

Hi @adrilefebvr !
Can check that the field is not hidden as shown in the documentation ?

Hi ! The thing is, it doesn’t appear at all in the field list

Hello @adrilefebvr ,

We have just worked on your project and we have normally solved your problem. Can you confirm that it works again on your side? :pray:

Kind regards,

Florian

Thanks ! It’s working well, thanks !

1 Like