https://issues.qgis.org/https://issues.qgis.org/favicon.ico2017-12-18T03:07:55ZQGIS Issue TrackingQGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=853642017-12-18T03:07:55ZPatrick Dunfordenzedrailmaps@gmail.com
<ul></ul><p>This is actually a very tricky little problem.</p>
<p>Basically when it decides to enforce the default values is if you tick a box called "Apply default value on update". At that point the default are always enforced in the field.</p>
<p>I read this was something to do with getting a timestamp put into a field that always updates itself every time the record is saved but the wording could be a lot more meaningful.</p>
<p>The box unticks itself next time you open the Attributes form section of the properties so this option can't actually be turned off if you change your mind, unless you remove the default altogether.</p>
<p>In programming we call this a "calculated field" not a "default".</p> QGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=853652017-12-18T03:50:40ZPatrick Dunfordenzedrailmaps@gmail.com
<ul></ul><p>This default thing is a crock, if I split a feature in two the second part is created with the default values, whereas the normal behaviour is that the second part will inherit the values of the part it was split from.</p> QGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=853712017-12-18T05:50:43ZNathan Woodrow
<ul></ul><p>This is simply a bug with that check box. The default behaviour is correct from what I can see here. If set the default to 10 it is set to that when I open the form and I can change it. If you select Apply Default on Update then it should only set the new value when you save. That checkbox should really set the editable box to false so it's a read only field at that point.</p> QGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=854222017-12-19T08:08:38ZMatthias Kuhn
<ul></ul><p>Thank you for your bug report.</p>
<blockquote>
<p>I read this was something to do with getting a timestamp put into a field that always updates itself every time the record is saved but the wording could be a lot more meaningful.</p>
</blockquote>
<p>Do you have a suggestion?</p> QGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=854232017-12-19T08:08:45ZMatthias Kuhn
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul> QGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=854402017-12-20T19:47:41ZPatrick Dunfordenzedrailmaps@gmail.com
<ul></ul><p>I guess that it revolves around what terminology "default" or "calculated" as suggested is the appropriate wording to use. I always have regarded a default as the value that will be entered in a field if you don't put a value in yourself, and is a way of making sure there are no nulls entered.</p> QGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=854442017-12-21T10:29:24ZHarrissou Santanna
<ul></ul><p>I think the idea behind this term is that the field would be populated <strong>by</strong> default, meaning that you can skip filling it manually. <br />Actually it's a default option (in the way you suggest it, Patrick) if you fill it with a value; you'd get the same value for each new feature you create. Nothing dynamic. <br />In case you use an expression, the value in the form can change. and i think it'd be a shame to not extend this field with QGIS expression power. <br />What's the vocabulary used for fields like primary key? It's almost the same behavior.</p>
<p>About the checkbox behavior, it's a bug: default should be deactivatable, modifiable, (un)enforcable....</p> QGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=858382018-01-16T06:09:23ZNyall Dawson
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/fe2292c59a5fb7c65399aaf8903e33dbe9ab41d4" title="Fix default value 'apply on update' setting not correctly restored Fixes #17712">qgis|fe2292c59a5fb7c65399aaf8903e33dbe9ab41d4</a>.</p> QGIS Application - Bug report #17712: When a default value is set on a layer, a new value cannot be enteredhttps://issues.qgis.org/issues/17712?journal_id=871082018-02-22T10:14:46ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Resolution</strong> set to <i>fixed/implemented</i></li></ul>