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
If the mandatory query parameter is not set while updating a column, the resulting state of the mandatory property is the same as before the PUT
If the mandatory query parameter is set, the resulting state after the PUT should match the value of the query parameter.
Actual behavior
If the mandatory query parameter is not set while updating a column, the resulting state of the mandatory property is the same as before the PUT (:heavy_check_mark: as expected)
If the mandatory query parameter is set, the resulting state after the PUT is alwaystrue, no matter what the actual value of the query parameter was. (:x: Does not work as expected)
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.
Steps to reproduce
Web UI: Define a column with
title
=Foo
and setmandatory
totrue
.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
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
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
mandatory
query parameter is not set while updating a column, the resulting state of themandatory
property is the same as before thePUT
mandatory
query parameter is set, the resulting state after thePUT
should match the value of the query parameter.Actual behavior
mandatory
query parameter is not set while updating a column, the resulting state of themandatory
property is the same as before thePUT
(:heavy_check_mark: as expected)mandatory
query parameter is set, the resulting state after thePUT
is alwaystrue
, no matter what the actual value of the query parameter was. (:x: Does not work as expected)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