Skip to content

fix(web): preserve negative numeric CSV values - #7337

Open
X-LightYear wants to merge 1 commit into
apache:rocketmq-studiofrom
X-LightYear:contrib/pair2-csv-negative-numbers
Open

X-LightYear wants to merge 1 commit into
apache:rocketmq-studiofrom
X-LightYear:contrib/pair2-csv-negative-numbers

Conversation

@X-LightYear

Copy link
Copy Markdown
Contributor

Summary

  • keep parsed numeric values numeric in CSV exports
  • preserve formula protection for string cells
  • add regression coverage for negative metric values

Problem

The shared CSV helper treated every text value beginning with - as a possible spreadsheet formula. Metric Explorer supplies parsed sample values as numbers, so negative values were exported with a leading apostrophe and opened as text.

Fix

Only string-like values retain the formula-protection prefix. Numeric values are serialized without the prefix.

Testing

  • pre-fix focused regression failed: escapeCsvCell(-3.5) returned "'-3.5"
  • download.test.ts and resourceCsvImport.test.ts: 26 passed
  • frontend lint: 0 errors, existing warnings only
  • npm run build: TypeScript/Vite completed; existing distribution-license verification rejected the toggle-selection source/license mismatch

Fixes #7336

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant