Add to script misc/cronjobs/runreport.pl args for CSV : separator and quote
cf https://metacpan.org/pod/Text::CSV#new
Created attachment 147187 [details] [review] Bug 33050: More args for misc/cronjobs/runreport.pl Add to script misc/cronjobs/runreport.pl args for CSV : * separator character * quote character * no quote (by default double quote) See perl doc https://metacpan.org/pod/Text::CSV#new Test plan : Play with each arg and compare results of runreport.pl
Created attachment 147188 [details] [review] Bug 33050: More args for misc/cronjobs/runreport.pl Add to script misc/cronjobs/runreport.pl args for CSV : * separator character * quote character See perl doc https://metacpan.org/pod/Text::CSV#new Test plan : Play with each arg and compare results of runreport.pl
I will change this to deal only with quote once Bug 33285 is pushed
Created attachment 152499 [details] [review] Bug 33050: Allow to specify quote char in runreport.pl Add to script misc/cronjobs/runreport.pl quote char arg (only for CSV). See perl doc https://metacpan.org/pod/Text::CSV#new This patch also adds missing '--separator' in POD. Test plan : 1 - Write a SQL report 2 - perl misc/cronjobs/runreport.pl --format csv 1 (or correct report number) 3 - Note you get double quotes 4 - Apply patch 5 - Repeat #2 - no change 6 - perl misc/cronjobs/runreport.pl --format csv --quote "'" 1 7 - Now it is single quote delimited 8 - perl misc/cronjobs/runreport.pl --format tsv --separator "'" 1 9 - Error is reported, you cannot set quote unless csv 10 - Try empty string as quote
Patch revisited and better test plan
Created attachment 156133 [details] [review] Bug 33050: Allow to specify quote char in runreport.pl Add to script misc/cronjobs/runreport.pl quote char arg (only for CSV). See perl doc https://metacpan.org/pod/Text::CSV#new This patch also adds missing '--separator' in POD. Test plan : 1 - Write a SQL report 2 - perl misc/cronjobs/runreport.pl --format csv 1 (or correct report number) 3 - Note you get double quotes 4 - Apply patch 5 - Repeat #2 - no change 6 - perl misc/cronjobs/runreport.pl --format csv --quote "'" 1 7 - Now it is single quote delimited 8 - perl misc/cronjobs/runreport.pl --format tsv --separator "'" 1 9 - Error is reported, you cannot set quote unless csv 10 - Try empty string as quote Signed-off-by: David Nind <david@davidnind.com>
Created attachment 158207 [details] [review] Bug 33050: Allow to specify quote char in runreport.pl Add to script misc/cronjobs/runreport.pl quote char arg (only for CSV). See perl doc https://metacpan.org/pod/Text::CSV#new This patch also adds missing '--separator' in POD. Test plan : 1 - Write a SQL report 2 - perl misc/cronjobs/runreport.pl --format csv 1 (or correct report number) 3 - Note you get double quotes 4 - Apply patch 5 - Repeat #2 - no change 6 - perl misc/cronjobs/runreport.pl --format csv --quote "'" 1 7 - Now it is single quote delimited 8 - perl misc/cronjobs/runreport.pl --format tsv --separator "'" 1 9 - Error is reported, you cannot set quote unless csv 10 - Try empty string as quote Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 158208 [details] [review] Bug 33050: Perltidy Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment on attachment 158208 [details] [review] Bug 33050: Perltidy Skipping commit that tidies all the file.
Pushed to master for 23.11. Nice work everyone, thanks!
Small enhancement, I choose to backport. Pushed to 23.05.x for 23.05.06