In tracker report, in "Export to CSV" there is a 3rd option "Export all columns with comments".
All the fields are exported and a column that is added to the report __followup_comments
.
This column contains the list of all visible comments with their date and author with following format:
author: Realname <email>
date: ISO8601 date
format: [text|commonmark|html]
text
each comment is separated by a fake separator: \n\n-------->8 NEXT >8--------\n\n
Forcasted implementation
Looking at plugins/tracker/include/Tracker/Report/Tracker_Report_Renderer_Table.class.php
the goal is not to refactor everything but to extract the CSV in a dedicated class and to add the behavior in place in protected function exportToCSV($only_columns)