View Issue Details

IDProjectCategoryView StatusLast Update
0003432Expressions[FreeCAD] Bugpublic2018-04-21 20:48
Reporterulrich1aAssigned Toeivindkvedalen 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version[FreeCAD] 0.17 
Target VersionFixed in Version[FreeCAD] 0.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

Activities

ulrich1a

2018-04-16 20:06

reporter  

aggregate_unit_bug.fcstd (1,743 bytes)

eivindkvedalen

2018-04-20 17:57

developer   ~0011169

Fix at: https://github.com/FreeCAD/FreeCAD/pull/1414

wmayer

2018-04-21 20:48

administrator   ~0011174

https://github.com/FreeCAD/FreeCAD/commit/ae7bef997870d0bcffc197c852b4b2a1bbe6ffca

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