1769 views set mandatory state of a column - #2053
Conversation
663a888 to
ec28231
Compare
ec28231 to
cb90299
Compare
|
@blizz Would appreciate a review! |
| $defaultValue = $column->getSelectionDefault(); | ||
| return $defaultValue !== null && $defaultValue !== '' && $defaultValue !== '[]'; | ||
| } | ||
| return $value !== null && $value !== ''; |
There was a problem hiding this comment.
Doing all this to ensure that when row requests are made via the API, the mandatory condition is respected. Maybe there's an easier way to do it?
21da51b to
64dc43f
Compare
|
in ResponseDefinitions.php, the API documentation need to be extended by the mandatory key, similar as in https://github.com/nextcloud/tables/pull/1958/files#diff-b15c74adf6c164ed61707f0a48432bb4df4972b0f3994256778091bcd83172e8R29 |
7c99707 to
88d1be8
Compare
The one with two z is some other person btw 😁 (classic) |
|
Works like a charm! I suppose the cypress errors are unrelated…? |
817dd25 to
3346898
Compare
The failing test in The failing test in
The key insight was that |
115a08a to
21e4814
Compare
042e07d to
01af1be
Compare
enjeck
left a comment
There was a problem hiding this comment.
I was just testing again and I realized that the mandatory field doesn't work for the SelectionCheckForm type. Both checked and unchecked cases give an error saying that the field is empty.
The UsergroupForm doesn't work either, allowing me to save even when empty and mandatory. THis is also a problem not just for the views, but for the mandatory field that can be set on the table's column (unrelated to this PR, but could be nice to fix here while fixing the view case)
01af1be to
4855de3
Compare
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: Enjeck C <patrathewhiz@gmail.com>
Signed-off-by: Enjeck C <patrathewhiz@gmail.com>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
…ettings Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: Enjeck C <patrathewhiz@gmail.com>
9d89c0e to
2f19064
Compare
|
Here's the problem I was talking about: Screen.Recording.2025-09-25.at.04.29.15.movI introduced the bug anyway, lol. So went ahead and fixed at 2f19064 |
Resolves #1769
Add the possibility to make columns in views mandatory.
TODO: