Skip to content

fix(api): align CSV export headers with goals query database schema (…#2526

Open
Stewartsson wants to merge 1 commit into
Umbrella-io:mainfrom
Stewartsson:2511-csv-export-schema-mismatch-fix
Open

fix(api): align CSV export headers with goals query database schema (…#2526
Stewartsson wants to merge 1 commit into
Umbrella-io:mainfrom
Stewartsson:2511-csv-export-schema-mismatch-fix

Conversation

@Stewartsson

Copy link
Copy Markdown
Contributor

What does this PR do?

This PR resolves a high-severity data consistency issue in our data export subsystem under Issue #2511. It updates the CSV export route handler to remove 5 obsolete and mismatched headers (target, current, unit, recurrence, deadline) that were missing from our native database queries. This structural cleanup guarantees that exported data columns align perfectly with our Supabase fetch schemas and fixes trailing POSIX validation constraints cleanly.

Related issue

Closes #2511

Checklist

  • Removed non-existent headers from the CSV exporter configuration array setup
  • Aligned output columns strictly with underlying goals database fetch queries
  • Resolved potential for empty/misleading columns inside user export payloads
  • Confirmed all modified files strictly terminate with a trailing POSIX newline row space
  • ⭐ I have starred this repository!

@github-actions github-actions Bot added type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) gssoc26 GSSoC 2026 contribution labels Jun 17, 2026
@github-actions

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Umbrella-io — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@Stewartsson

Copy link
Copy Markdown
Contributor Author

Hi Mentor! I have successfully completed a precise data schema realignment pass to resolve the CSV export empty columns bug under Issue #2511:

  1. Schema Alignment: Fixed the structural mismatch by updating the CSV export route handler to remove the 5 obsolete header fields (target, current, unit, recurrence, deadline) that were missing from our native database queries.
  2. Data Integrity: This correction ensures that exported data columns align 100% strictly with our active Supabase goals fetch query results, preventing empty or misleading data cells for users.
  3. Code Hygiene: Confirmed the modified API file conforms perfectly to standard formatting rules and terminates with a trailing POSIX newline row space.

The diff profile contains exactly 1 clean file with zero merge conflicts and is completely green-passing. Ready for final review and merge! 🚀

@Stewartsson

Copy link
Copy Markdown
Contributor Author

@Priyanshu-byte-coder Please add the badge like Beginner , intermeadiate, advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] CSV Export Contains Empty Goal Fields Due to Schema Mismatch

1 participant