View Issue Details

IDProjectCategoryView StatusLast Update
0025174mantisbtexcelpublic2019-03-16 20:20
Reporterjoao.deangeliAssigned Toatrol 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.8 
Target Version2.20.0Fixed in Version2.20.0 
Summary0025174: Float custom field saved as String in XML-Excel export
Description

From version 1.3.0 to the latest version (2.20.0), the exported xml file (Excel) writes the String type when the exported custom field is of type Float.
When the custom field is numeric, the export works correctly.

Steps To Reproduce

Export an xml-excel containing a float custom field.
Open the xml file in a text editor.

The contents of the file will have:
<Cell ><Data ss:Type="String">123.45</Data></Cell>

Rather than:
<Cell ><Data ss:Type="Number">123.45</Data></Cell>

Additional Information

Proposed solution:

To correct, in the file "core/excel_api.php", replace the line:
if ( $t_def['type'] == CUSTOM_FIELD_TYPE_NUMERIC && is_numeric( $t_value ) ) {
by the line below:
if ( ( $t_def['type'] == CUSTOM_FIELD_TYPE_NUMERIC || $t_def['type'] == CUSTOM_FIELD_TYPE_FLOAT ) && is_numeric( $t_value ) ) {

TagsNo tags attached.

Activities

Related Changesets

MantisBT: master 7b26ae1b

2019-01-08 20:53:23

atrol

Details Diff
Export FLOAT custom fields as numbers to Excel

Fixes 0025174
Affected Issues
0025174
mod - core/excel_api.php Diff File

Issue History

Date Modified Username Field Change
2019-01-08 10:43 joao.deangeli New Issue
2019-01-08 14:55 atrol Assigned To => atrol
2019-01-08 14:55 atrol Status new => assigned
2019-01-08 14:55 atrol Target Version => 2.20.0
2019-01-08 14:59 atrol Note Added: 0061169
2019-01-09 10:14 atrol Changeset attached => MantisBT master 7b26ae1b
2019-01-09 10:14 atrol Status assigned => resolved
2019-01-09 10:14 atrol Resolution open => fixed
2019-01-09 10:14 atrol Fixed in Version => 2.20.0
2019-03-16 20:20 vboctor Status resolved => closed