nextcloud / nextcloud/tables

Changing default selection of column type "selection" modifies all empty fields im column

Open
#1,473 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug
Dominant language
JavaScript
Stars
214
Forks
52
Avg merge
1d 10h
Merged PRs (30d)
82

Description

Steps to reproduce
  1. Create a column with type "selection" and do not make it obligatory
  2. Create some entries in table and do not choose any entry of the selection (because it's not obligatory).
    Image
  3. Afterwards modify the column and make one of the entries to the default.
    Image
Expected behavior

Nothing should change in the table because the column when not obligatory should also deal with empty values.

Actual behavior

All rows in the table that have no value in the column get automatically set the default value of the column.
Image

Tables app version

0.8.1

Browser

Firefox 131.0.3

Client operating system

Linux

Operating system

No response

Web server

Apache

PHP engine version

None

Database

MariaDB

Additional info

In fact the column type "selection" should also deal with empty values - it seams like there are multiple problems that maybe arise with the fact that "empty" somewhere in the code is the first entry in the list (but not everywhere): you can't choose the first entry in the list as default because in this situation the form to insert new entries always shows an empty field for the selection.

I can open an other issue for this error if needed 🙂 .

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior in the Tables app using the reported steps: create an optional selection column, leave values empty, then set a default. Trace how empty selection values are handled when the column definition changes. Done means existing empty rows remain empty while the new default applies only where intended, and the first selection entry remains selectable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.