Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Column with default value is not stored correctly #1480

Open
radstar557 opened this issue Nov 27, 2024 · 1 comment
Open

Column with default value is not stored correctly #1480

radstar557 opened this issue Nov 27, 2024 · 1 comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@radstar557
Copy link

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

@radstar557 radstar557 added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Nov 27, 2024
@blizzz
Copy link
Member

blizzz commented Jan 6, 2025

I think it is intended to not set a value when the default is left, but not entirely sure. @enjeck Do you know?

The thing then is that when returning the data, default values are not submitted, so the current default of the column applies. This is of course not so useful when exporting or sending it elsewhere. I suppose we could send the value… but then the client like the front end would not know it is a default, but a properly stored value. Perhaps another flag in the response data can give this clarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants