Statistics publisher uses CurrentCulture for values (Bug #290)


Added by Daniel Rose over 3 years ago. Updated over 3 years ago.


Status:Closed Start date:07/26/2013
Priority:Normal Due date:
Assignee:Daniel Rose % Done:

0%

Category:Publisher Spent time: -
Target version:1.8.4
Affected version:1.8.3

Description

I just updated my CCNet installation to use more statistics, in particular the code coverage. The values extracted are double/decimal. The build server is running on a German language Windows 7 SP1, which means the CurrentCulture is also German.

When the statistics publisher writes the values of the statistics to the statistics.csv and report.xml, it does not specify which culture is to be used. Thus, the CurrentCulture is used. Since the decimal mark in German is ',', that means that 12,34 is written, for example. That causes a bunch of problems. The statistics.csv file uses commas as separators, so reading the file would result in the number being split into two, making everything else invalid as well. The report.xml file is read via JavaScript to create the statistics graphs and data. The data is assumed to have a '.' as decimal mark, so the actual value is ignored.


History

Updated by Daniel Rose over 3 years ago

I wrote a small fix (no unit tests) which always converts the values to string using the invariant culture. See https://github.com/ccnet/CruiseControl.NET/pull/194

Updated by Ruben Willems over 3 years ago

  • Category set to Publisher
  • Status changed from New to Closed
  • Target version set to 1.8.4

Also available in: Atom PDF