API view is returning only partial dataset in JSON, some column are missing.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 214
- Forks
- 52
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 82
Description
Steps to reproduce
- Create table, add some columns, example: fristname, lastname, email
- also add a column as choice with a default value checked, example: status: [new, in_progress, error]
- add some rows (without filling choice column letting default value)
- add one row with choice column value forced (may be default value)
- Create a view on a the table
- add some metdata column like
IDorcreatedBy - This is correctly displayed in the web browser (including filled default values)
- call API
/index.php/apps/tables/api/1/views/{viewId}/rows==> only partial data are displayed in JSON
all data shown are fake randomly generated
My view
form the table
Expected behavior
All data, including default value, if any, should be send as JSON result. This actually work in the View export as CSV were all data are pushed to the CSV (except unfilled default value left as blank)
Here API call is not consistent, with the data visually available on the browser.
Actual behavior
Partial data set is returned
calling API /index.php/apps/tables/api/1/views/{viewId}/rows
[
"troncated_data[...]" : "I didn't paste all data",
{
"id": 2031,
"tableId": 4,
"createdBy": "admin",
"createdAt": "2024-04-26 12:56:13",
"lastEditBy": "admin",
"lastEditAt": "2024-04-26 12:56:13",
"data": [
{
"columnId": 25,
"value": "igor@email.invalid"
},
{
"columnId": 24,
"value": "Dosgor"
},
{
"columnId": 23,
"value": "Igor"
}
]
},
{
"id": 2032,
"tableId": 4,
"createdBy": "admin",
"createdAt": "2024-04-26 13:00:21",
"lastEditBy": "admin",
"lastEditAt": "2024-04-26 13:00:21",
"data": [
{
"columnId": 25,
"value": "ivanoe@terrible.email"
},
{
"columnId": 24,
"value": "Leterrible"
},
{
"columnId": 23,
"value": "Ivan"
}
]
}
]
Tables app version
0.7.0
Browser
125.0 (64-bit)
Client operating system
xubuntu 22.04
Operating system
Linux debian 12 (64 bits)
Web server
None
PHP engine version
PHP 8.2
Database
PostgreSQL
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue through /index.php/apps/tables/api/1/views/{viewId}/rows with a table containing ordinary columns, a choice column with a default, and metadata columns. Compare the JSON response with the browser view and the View export as CSV; done means the API includes every displayed column and its default value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, postgresql
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100