Bug Description
The CSV export implementation expects goal fields that are not included in the goals query, resulting in empty columns in exported CSV files.
The goals query currently selects:
- id
- user_id
- title
- description
- status
- created_at
- updated_at
However, the CSV export generates headers for:
- target
- current
- unit
- recurrence
- deadline
Since these fields are not present in the fetched goal objects, the exported CSV contains empty values for those columns.
Expected Behavior:
CSV exports should either:
- Include the required fields in the database query, or
- Remove outdated/non-existent columns from the CSV header definition.
Current Behavior:
CSV files contain empty columns that suggest data exists when it is never actually exported.
Steps to Reproduce
-
Sign in to DevTrack.
-
Navigate to the data export functionality.
-
Request a CSV export (?format=csv).
-
Open the generated CSV file.
-
Observe that the columns:
- target
- current
- unit
- recurrence
- deadline
are present in the header row but contain empty values for all records.
Affected Area
Other
Screenshots
No response
Browser & OS
No response
Environment
None
Additional Context
Relevant code sections:
Goals Query:
.select("id, user_id, title, description, status, created_at, updated_at")
CSV Headers:
const headers = [
"id",
"title",
"target",
"current",
"unit",
"recurrence",
"deadline",
"created_at"
];
Potential Fixes:
- Update the goals query to fetch the missing fields if they exist in the schema.
- Or remove obsolete fields from the CSV export header definition.
Impact:
Users receive incomplete or misleading CSV exports, and the CSV format becomes inconsistent with the underlying exported data.
Bug Description
The CSV export implementation expects goal fields that are not included in the goals query, resulting in empty columns in exported CSV files.
The goals query currently selects:
However, the CSV export generates headers for:
Since these fields are not present in the fetched goal objects, the exported CSV contains empty values for those columns.
Expected Behavior:
CSV exports should either:
Current Behavior:
CSV files contain empty columns that suggest data exists when it is never actually exported.
Steps to Reproduce
Sign in to DevTrack.
Navigate to the data export functionality.
Request a CSV export (
?format=csv).Open the generated CSV file.
Observe that the columns:
are present in the header row but contain empty values for all records.
Affected Area
Other
Screenshots
No response
Browser & OS
No response
Environment
None
Additional Context
Relevant code sections:
Goals Query:
.select("id, user_id, title, description, status, created_at, updated_at")
CSV Headers:
const headers = [
"id",
"title",
"target",
"current",
"unit",
"recurrence",
"deadline",
"created_at"
];
Potential Fixes:
Impact:
Users receive incomplete or misleading CSV exports, and the CSV format becomes inconsistent with the underlying exported data.