Bug report #11000

QgsExpression target format

Added by Matthias Kuhn over 9 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Expressions
Affected QGIS version:2.4.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19342

Description

Expressions are currently evaluated without taking the target field type into account. This leads to strange behavior. Values are sometimes formatted for representation, but are not adjusted in memory.

I propose to add a method to define a target field on an expression. After evaluating an expression, the result should be converted to match these specifications of the target field (length, precision, type).


Related issues

Related to QGIS Application - Bug report #10993: Virtual fields: if selecting integer as data type, then f... Closed 2014-07-31
Related to QGIS Application - Bug report #10995: Virtual fields: graduated symbology with natural breaks d... Closed 2014-07-31

Associated revisions

Revision 7318c730
Added by Matthias Kuhn over 9 years ago

Convert values to target field format

For the field calculator and virtual fields.

Fix #11000
Fix #10995
Fix #10993

History

#1 Updated by Matthias Kuhn over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF