Bug report #16358
Can't use custom function to select by expression
|Affected QGIS version:||2.18.3||Regression?:||No|
|Operating System:||linux||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24268|
I'm following this tutorial (http://www.qgistutorials.com/en/docs/custom_python_functions.html) on custom expressions and all goes well - my function shows up in the custom section and seems to work for the preview giving 21S for the first feature. When I extend the selection expression to GetUtmZone() = '21S' the output preview still says 1. But when I click on the select button no features are selected.
This works on 2.14.x but fails on 2.18.x.
Matthias Kuhn suggested adding usesgeometry=True to the decorator but that seems not to help.
Full discussion can be found at https://gis.stackexchange.com/questions/232006/cant-select-using-a-custom-function-in-qgis-2-18-3