https://issues.qgis.org/https://issues.qgis.org/favicon.ico2018-08-23T06:49:35ZQGIS Issue TrackingQGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=920272018-08-23T06:49:35ZAlessandro Pasotti
<ul></ul><p>How do you think QGIS would know if a NOT NULL column is filled by a trigger?</p>
<p>Do you have any solution in mind?</p> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=920282018-08-23T06:50:03ZAlessandro Pasotti
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=920472018-08-23T13:10:07ZTudor Bărăscutudorbarascu@yahoo.com
<ul><li><strong>File</strong> <a href="/attachments/download/13187/problem1.jpg">problem1.jpg</a> added</li></ul><p>From my perspective, it should all function like this:</p>
<p>- When QGIS detects the NOT NULL column, the QGIS side NOT NULL contraint should be enabled automagically<br />- However, the user should have the option to disable it<br /><img src="https://issues.qgis.org/attachments/download/13187/problem1.jpg" alt="" /><br />The user should be able to uncheck the Not Null checkbox in the constraints part</p>
<p>Sounds good?</p>
<p>Thank you for taking a look Alessandro!</p> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=920482018-08-23T13:27:34ZAlessandro Pasotti
<ul><li><strong>Tracker</strong> changed from <i>Bug report</i> to <i>Feature request</i></li></ul><p>That sounds reasonable to me, perhaps also issue a warning when the user unticks the checkbox: "The fields is marked NOT NULL but you are overriding this check, if you do not fill this field and there is nothing to set its value the operation will probably be rejected by the backend".</p>
<p>Changing to feature request (ok, I know it's debatable :)</p> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=943142018-10-15T05:48:20ZTudor Bărăscutudorbarascu@yahoo.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Open</i></li></ul> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=943152018-10-15T05:49:07ZNyall Dawson
<ul><li><strong>Assignee</strong> set to <i>Nyall Dawson</i></li></ul> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=943162018-10-15T06:08:59ZNyall Dawson
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li><li><strong>Assignee</strong> deleted (<del><i>Nyall Dawson</i></del>)</li></ul><p>Does this relate to <a class="issue tracker-1 status-5 priority-5 priority- closed" href="https://issues.qgis.org/issues/20073" title="Form validation doesn't take care of 2 columns primary key (Closed)">#20073</a> ?</p> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=943202018-10-15T07:15:59ZTudor Bărăscutudorbarascu@yahoo.com
<ul></ul><p>@Nyall Yes! IMHO It's ok that the forms get the constraints automatically but the settings of the constraints should override this.</p> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=961162018-11-15T13:35:05ZTudor Bărăscutudorbarascu@yahoo.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Open</i></li></ul><p>A workaround would be to simply fill those specific columns with a default value, -1 let's say and it will let you pass while the database logic will change it to what's supposed to be.</p> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=973212018-12-18T08:35:01ZHugo Mercierhugo.mercier@oslandia.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority- closed" href="/issues/20831">Bug report #20831</a>: Range widget does not honor default value on not null column</i> added</li></ul> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=973232018-12-18T08:35:13ZHugo Mercierhugo.mercier@oslandia.com
<ul></ul><p>Tudor, about your proposed workaround, I observed this is not even possible when the primary key has the default widget "Range". It seems the Range widget does not take the default value into account. However changing the widget type to "Text editor" allows to use a default value (and postgres is ok to receive a text for an integer)</p>
<p>Related issue <a class="issue tracker-1 status-5 priority-4 priority- closed" href="https://issues.qgis.org/issues/20831" title="Range widget does not honor default value on not null column (Closed)">#20831</a></p> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=993012019-01-30T10:06:58ZHugo Mercierhugo.mercier@oslandia.com
<ul><li><strong>Assignee</strong> set to <i>Hugo Mercier</i></li></ul> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=993192019-01-30T12:06:52ZHugo Mercierhugo.mercier@oslandia.com
<ul><li><strong>Assignee</strong> deleted (<del><i>Hugo Mercier</i></del>)</li></ul> QGIS Application - Bug report #19671: The Ok button for the form dialog is disabled for NOT NULL Postgres columnshttps://issues.qgis.org/issues/19671?journal_id=993452019-01-30T14:39:10ZJürgen Fischerjef@norbit.de
<ul><li><strong>Tracker</strong> changed from <i>Feature request</i> to <i>Bug report</i></li><li><strong>Affected QGIS version</strong> set to <i>3.5(master)</i></li><li><strong>Crashes QGIS or corrupts data</strong> set to <i>No</i></li><li><strong>Regression?</strong> set to <i>Yes</i></li></ul>