Skip to content

[bug] Missing quoting/escaping of double quotes upon CSV export for github, gitlab, or JIRA import #158

@tom-m-galla

Description

@tom-m-galla

🐞 Bug report

Description

Exports to CSV-based files for import into github, gitlab, and JIRA do not properly quote/escape the string fields which eventually end up in the individual CSV fields. - This prevents proper parsing and importing of the resulting CSV file, since it effectively produces an invalid CSV file.

Reproduction

  • Create a code review finding and have the "Description", "Title", or "Additional Info" field contain one or more double quote ('"') characters.
  • Export the review findings as CSV files for github, gitlab, or JIRA import
  • Verify that the double quotes ('"') are not properly quoted/escaped (i.e., turned into a duplicated double quote)

🌍 Your Environment

Edition Windows 11 Enterprise
Version 23H2
Installed on ‎18/‎06/‎2024
OS build 22631.4169
Experience Windows Feature Experience Pack 1000.22700.1034.0

WSL2 with Ubuntu 20.04

Root cause

The three export handlers for CSV files for github, gitlab, or JIRA import only escape the end-of-line characters (by calling escapeEndOfLineForCsv(), but do not escape/quote any double quotes ('"') (by calling escapeDoubleQuotesForCsv().

Suggested fix

See changes in PR #159.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions