Bug report #9666

Expression Engine Parsing

Added by SF GIS over 10 years ago. Updated over 10 years ago.

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

Description

Update breaks expression engine string builder handling of at least conditional statements. This appears to be a parsing error when saving an expression. Discovered when using a conditional expression in the data defined properties of a style.

Example:

CASE WHEN field1 IS NULL THEN field2 ELSE field1 END

Where field1 and field2 are data fields

Once the string is committed, the space before the ELSE is stripped out, rendering the expression invalid.

CASE WHEN field1 IS NULL THEN field2ELSE field1 END

Attempted to double quote the data fields and use multiple lines in the statement, however the double quotes and line feeds are stripped when the expression is committed ending with the same result.

Once the data defined properties window is closed, the expression is removed entirely and replaced with "(no root)" without the quotes.

Associated revisions

Revision 1d84978f
Added by Jürgen Fischer over 10 years ago

expressions: put black in front of ELSE (fixes #9666)

History

#1 Updated by SF GIS over 10 years ago

Additional notes. This error impacts existing styles.

#2 Updated by Jürgen Fischer over 10 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF