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

API view is returning only partial dataset in JSON, some column are missing. #1008

Open
Sylvain303 opened this issue Apr 26, 2024 · 0 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@Sylvain303
Copy link

Sylvain303 commented Apr 26, 2024

Steps to reproduce

  1. Create table, add some columns, example: fristname, lastname, email
  2. also add a column as choice with a default value checked, example: status: [new, in_progress, error]
  3. add some rows (without filling choice column letting default value)
  4. add one row with choice column value forced (may be default value)
  5. Create a view on a the table
  6. add some metdata column like ID or createdBy
  7. This is correctly displayed in the web browser (including filled default values)
  8. 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
image

form the table
image

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": "[email protected]"
      },
      {
        "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": "[email protected]"
      },
      {
        "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

@Sylvain303 Sylvain303 added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Apr 26, 2024
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

1 participant