View Issue Details

IDProjectCategoryView StatusLast Update
0003432ExpressionsBugpublic2018-04-21 20:48
Reporterulrich1a Assigned Toeivindkvedalen  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.17 
Fixed in Version0.18 
Summary0003432: numbers with units are not handled at all in aggregate functions, when written direct into the function call
Descriptionaggregate functions can handle expressions with units. But when a number with a unit is written directly into the function call, a wrong result is given back. Examples are:
=max(3mm;4mm;5mm) returns 0
=count(A3;A4;5mm) returns 2 even if A3 and A4 contain a number with a unit.
I have tested the following aggregate functions: max, min, sum, average, count.
It seems that most aggregate functions are affected by this.

The bug was reported here in the forum: https://forum.freecadweb.org/viewtopic.php?f=3&t=28104&start=10#p228086
Steps To ReproduceOpen a FreeCAD document.
Insert a spreadsheet.
write into a cell: =max(3mm;4mm;5mm)
The delivered result is: 0
Additional InformationOS: Debian GNU/Linux 9.4 (stretch)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13537 (Git)
Build type: Unknown
Branch: Rueck6
Hash: f40bed7903471827ecb62ba5bc1dd6903b0230ef
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
Tagsexpressions
FreeCAD Information

Issue History

Date Modified Username Field Change
2018-04-16 20:06 ulrich1a New Issue
2018-04-16 20:06 ulrich1a Tag Attached: expressions
2018-04-16 20:06 ulrich1a File Added: aggregate_unit_bug.fcstd
2018-04-19 20:41 eivindkvedalen Assigned To => eivindkvedalen
2018-04-19 20:41 eivindkvedalen Status new => assigned
2018-04-20 17:57 eivindkvedalen Note Added: 0011169
2018-04-21 20:48 wmayer Status assigned => closed
2018-04-21 20:48 wmayer Resolution open => fixed
2018-04-21 20:48 wmayer Fixed in Version => 0.18
2018-04-21 20:48 wmayer Note Added: 0011174