https://issues.qgis.org/https://issues.qgis.org/favicon.ico2017-09-20T15:08:02ZQGIS Issue TrackingQGIS Application - Bug report #17170: Refactor fields processing algorithm missing expression context when edited in a modelhttps://issues.qgis.org/issues/17170?journal_id=822412017-09-20T15:08:02ZAndreas Neumann
<ul></ul><p>Update: same behaviour in QGIS 2.18. It also fails during edition in a model, but works only when executed as a single algorithm.</p> QGIS Application - Bug report #17170: Refactor fields processing algorithm missing expression context when edited in a modelhttps://issues.qgis.org/issues/17170?journal_id=822422017-09-20T15:08:47ZAndreas Neumann
<ul><li><strong>Assignee</strong> deleted (<del><i>Victor Olaya</i></del>)</li></ul> QGIS Application - Bug report #17170: Refactor fields processing algorithm missing expression context when edited in a modelhttps://issues.qgis.org/issues/17170?journal_id=822572017-09-21T08:56:15ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Affected QGIS version</strong> changed from <i>master</i> to <i>2.18.13</i></li><li><strong>Category</strong> changed from <i>Processing/QGIS</i> to <i>Processing/Modeller</i></li></ul> QGIS Application - Bug report #17170: Refactor fields processing algorithm missing expression context when edited in a modelhttps://issues.qgis.org/issues/17170?journal_id=831352017-09-26T03:49:17ZNyall Dawson
<ul></ul><p>This is quite tricky to fix, because inside the model designer algorithms which are part of the model do not have knowledge of the available fields which will be present in their inputs. i.e. all it usually knows is that the input will be <strong>some</strong> vector layer, not which one or what fields it will have.</p>
<p>There's certain circumstances when we could determine in the designer what fields are available, e.g. when a layer source is hardcoded into a model. We could also potentially see if any previous algorithm steps in the models have added fields which we can then be certain will exist at the later 'refactor fields' stage, and show just these guaranteed fields. But that's not straightforward to do!</p>
<p>I've tested here (on master) and Refactor Fields works ok for me if I enter an expression using hard coded field names. They just aren't shown in the expression widget, but the expression can still include these and the model works correctly.</p> QGIS Application - Bug report #17170: Refactor fields processing algorithm missing expression context when edited in a modelhttps://issues.qgis.org/issues/17170?journal_id=846682017-11-23T14:01:53ZMatthias Kuhn
<ul></ul><p><a class="external" href="https://github.com/qgis/QGIS-Enhancement-Proposals/issues/89#issuecomment-344550043">https://github.com/qgis/QGIS-Enhancement-Proposals/issues/89#issuecomment-344550043</a></p> QGIS Application - Bug report #17170: Refactor fields processing algorithm missing expression context when edited in a modelhttps://issues.qgis.org/issues/17170?journal_id=850762017-12-04T10:18:30ZAndreas Neumann
<ul></ul><p>Now we have the situation that the Refactor fields algorithm works ok in the model when first edited, but when saved and reloaded, it doesn't work anymore.</p>
<p>There seems to be some expression context missing after loading of a model.</p> QGIS Application - Bug report #17170: Refactor fields processing algorithm missing expression context when edited in a modelhttps://issues.qgis.org/issues/17170?journal_id=890772018-04-03T19:27:12ZNyall Dawson
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/d5617b8025e0b1ea09a4f83ca464b7306cad535b" title="[processing] Allow QgsVectorLayerSelectedFeatureSource to create expression context scopes Allow...">qgis|d5617b8025e0b1ea09a4f83ca464b7306cad535b</a>.</p>