ElvishArtisan / rivendell

A full-featured radio automation system targeted for use in professional broadcast and media environments
205 stars 64 forks source link

Cart Data Dump (csv) combines two field names in header #863

Closed MikeTheHammer closed 1 year ago

MikeTheHammer commented 1 year ago

In 3.6.6, when I go to export a "Cart Data Dump (csv)" with "Prepend field names" checked, the field names for "FILENAME" and "LENGTH" are combined in the header. Only the header is effected, not the data.

The header is emitted as (truncating for brevity): DESCRIPTION,OUTCUE,"FILENAME,LENGTH",START_POINT,END_POINT,

The quotation marks around FILENAME and LENGTH cause that header to be treated as a single field by (at least) Python's csv library, Microsoft Excel, and LibreOffice Calc.

(As I said, only the header is effected, not the data.)

The error seems to have been introduced with this commit: https://github.com/ElvishArtisan/rivendell/commit/a59712a5bf3a11e23b43f1795f5ed93c8052be99 .

The problem seems to be in rdlibrary/list_reports.cpp with line 603. It looks like *report+=RDCsvField("FILENAME,LENGTH"); needs to be changed to *report+=RDCsvField("FILENAME"); *report+=RDCsvField("LENGTH");

ElvishArtisan commented 1 year ago

Confirmed here.

ElvishArtisan commented 1 year ago

Fixed in 817d327. Please test!

MikeTheHammer commented 1 year ago

It's working for me now.

I built a fresh VM and installed using the installer. Confirmed the bug was still present there. Then updated from source and checked the new version. The new version has the correct header.