Cannot remove text from a field (replace current value with null in database)

Feature(s) impacted

I want to empty the content in my text field “Company Name” so that it saves as null in my database.

Observed behavior

I entered “Test” as a value in Company Name and saved the record. The value was correctly updated in my database. When I removed the “Test” text from the company name field and saved the record again, “Test” still remains in my database and the record is not updated in the UI either even though I got the green success message about updating the user.

Expected behavior

I should be able to remove the “Test” text and have null persist to that column in the database when saving the record.

Context

  • Project name: ESI Laravel
  • Team name: Operations
  • Environment name: Development
  • Agent technology: php
  • Agent (forest package) name & version: laravel-forestadmin, 3.1.1
  • Database type: postgresql
  • From forestadmin_schema.json for the field in question:
{
                    "defaultValue": null,
                    "enums": [],
                    "field": "company_name",
                    "integration": null,
                    "inverseOf": null,
                    "isFilterable": true,
                    "isPrimaryKey": false,
                    "isReadOnly": false,
                    "isRequired": false,
                    "isSortable": true,
                    "isVirtual": false,
                    "reference": null,
                    "type": "String",
                    "validations": []
                },

Hello @mngarwood

I reproduce this issue on my end.
I have opened a ticket and I’ll get back to you when this issue has been resolved.

I patched the problem on the php agent:

We plan to release this fix early next week

Hello @mngarwood

The fix has been released in version v1.10.3.
You can run the following command:

composer update forestadmin/laravel-forestadmin forestadmin/php-datasource-customizer forestadmin/php-datasource-eloquent

1 Like