Bug report #9666
Expression Engine Parsing
|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|
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.
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.