nextcloud / nextcloud/tables

Column with default value is not stored correctly

Open
#1,480 2 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.Have a got a existing table with existing columns and rows.
2.Add a column with a default value (in my case a column called "counter" with default value 1, 0 decimals, min and max = 1)
3.The value is shown in every row but is not accessible when exporting to csv / analytics app.

Expected behavior

If a column has got a default value, which is also shown visually, the value must be exported at any time.

Actual behavior

The default value is shown visually in every existing row. But if you export the data to csv or Analytics app (in next cloud), the value only is shown in rows which were added after the column has been added.

Tables app version

No response

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

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 issue with an existing table, add a column with a default value, and compare the displayed rows with CSV and Analytics app exports. Trace the export paths for existing versus newly added rows; done means the default value is included for every existing row in both export destinations.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.