nextcloud / tables

🍱 Nextcloud tables app
https://apps.nextcloud.com/apps/tables
GNU Affero General Public License v3.0
148 stars 23 forks source link

Updating `mandatory` property of a `column` via REST API always sets `mandatory` to `true` #384

Open stefan-niedermann opened 1 year ago

stefan-niedermann commented 1 year ago

Steps to reproduce

Web UI: Define a column with title = Foo and set mandatory to true.

Query Expected state Actual state
:heavy_check_mark: curl -X PUT -u 'user:password' https://nextcloud.local/index.php/apps/tables/api/1/columns/30?title=Bar title = Bar, mandatory = true title = Bar, mandatory = true
:heavy_check_mark: curl -X PUT -u 'user:password' https://nextcloud.local/index.php/apps/tables/api/1/columns/30?mandatory=true title = Bar, mandatory = true title = Bar, mandatory = true
:x: curl -X PUT -u 'user:password' https://nextcloud.local/index.php/apps/tables/api/1/columns/30?mandatory=false title = Bar, mandatory = false title = Bar, mandatory = true

Expected behavior

Actual behavior

Tables app version

0.5.1

Browser

No response

Client operating system

No response

Operating system

No response

Web server

None

PHP engine version

None

Database

None

Additional info

No response

datenangebot commented 11 months ago

you have to use a 0 instead of "false" due to only a 0 will be parsed as false by the framework. That is unrelated to the tables app, but I added a hint to the (new) docs.