Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"NULL" text in null field should disappear as soon as a field gets the focus #22883

Closed
qgib opened this issue May 31, 2016 · 15 comments · Fixed by #32068
Closed

"NULL" text in null field should disappear as soon as a field gets the focus #22883

qgib opened this issue May 31, 2016 · 15 comments · Fixed by #32068
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers Forms

Comments

@qgib
Copy link
Contributor

qgib commented May 31, 2016

Author Name: Patrick Dunford (@enzedrailmaps)
Original Redmine Issue: 14932
Affected QGIS version: 3.7(master)
Redmine category:forms


When I enter a value into a form or table all the fields are set to Null to begin with. When I type into the field the displayed word NULL turns into the text NULL. This means I have to select and delete that text if I don't want NULL appearing in that field.

The display of the word NULL in an empty field should not be with actual text that just makes extra work when entering data into fields.


@qgib
Copy link
Contributor Author

qgib commented Jun 26, 2016

Author Name: Matthias Kuhn (@m-kuhn)


In "Settings" -> "Options" -> "General" -> "Data Sources" the representation for NULL values can be changed (to e.g. an empty string).

Does that fix your issue?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jun 26, 2016

Author Name: Harrissou Santanna (@DelazJ)


It might do the trick but having NULL shown in a field can be handy.
Is that not possible to clear the field content (if NULL) once the user begins typing value (or clicks inside the cell) instead of appending the new text to 'NULL'? This will ease attribute filling imho.


  • operating_system was changed from Linux Mint to
  • os_version was changed from 17.3 to

@qgib
Copy link
Contributor Author

qgib commented Jan 3, 2017

Author Name: Giovanni Manghi (@gioman)


This seems to have been anyway addressed in QGIS 2.18. Here on 2.18.2 when I move with TAB or click on a cell that has "NULL" this automatically disappear, with no need to select and delete it before filling the cell with actual content.


  • resolution was changed from to fixed/implemented
  • category_id was configured as Attribute table
  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Nov 8, 2017

Author Name: gcarrillo - (gcarrillo -)


Reopened as this still happens in QGIS master (v2.99).

This happens in forms as well. You end up easily entering values like NULLmy value because of this issue.


  • resolution was changed from fixed/implemented to
  • subject was changed from "NULL" text in null field should not be actual text to "NULL" text in null field should dissapear as soon as a field gets the focus
  • description was changed from When I enter a value into a form or table all the fields are set to Null to begin with. When I type into the field the displayed word NULL turns into the text NULL. This means I have to select and delete that text if I don't want NULL appearing in that field.

The display of the word NULL in an empty field should not be with actual text that just makes extra work when entering data into fields. to When I enter a value into a form or table all the fields are set to Null to begin with. When I type into the field the displayed word NULL turns into the text NULL. This means I have to select and delete that text if I don't want NULL appearing in that field.

The display of the word NULL in an empty field should not be with actual text that just makes extra work when entering data into fields.

  • status_id was changed from Closed to Reopened
  • version was changed from 2.14.2 to master

@qgib
Copy link
Contributor Author

qgib commented Nov 8, 2017

Author Name: gcarrillo - (gcarrillo -)


  • subject was changed from "NULL" text in null field should dissapear as soon as a field gets the focus to "NULL" text in null field should disappear as soon as a field gets the focus

@qgib
Copy link
Contributor Author

qgib commented Nov 13, 2017

Author Name: Giovanni Manghi (@gioman)


gcarrillo - wrote:

Reopened as this still happens in QGIS master (v2.99).

This happens in forms as well. You end up easily entering values like NULLmy value because of this issue.

I cannot confirm on the latest master on osgeo4w.


  • status_id was changed from Reopened to Feedback

@qgib
Copy link
Contributor Author

qgib commented Feb 22, 2018

Author Name: Giovanni Manghi (@gioman)


Closing for lack of feedback, please reopen if necessary.


  • status_id was changed from Feedback to Closed
  • resolution was changed from to not reproducable

@qgib
Copy link
Contributor Author

qgib commented Mar 12, 2018

Author Name: gcarrillo - (gcarrillo -)


Still happening in master (ea0c705).

I attached a GIF to illustrate the issue.


  • 12428 was configured as null_values.gif
  • status_id was changed from Closed to Reopened

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


End of life notice: QGIS 2.18 LTR

Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/


  • resolution was changed from not reproducable to end of life
  • status_id was changed from Reopened to Closed

@qgib
Copy link
Contributor Author

qgib commented Apr 29, 2019

Author Name: gcarrillo - (gcarrillo -)


Just tested this in QGIS master 3.7 and it's still happening.
I attach a GIF showing the issue, which seems to be solved for string fields but not for numeric and date fields.

Reopening, since BSF Swissphoto will fund this fix.


  • resolution was changed from end of life to
  • 14860 was configured as null_values_2.gif
  • category_id was changed from Attribute table to Forms
  • status_id was changed from Closed to Reopened
  • version was changed from master to 3.7(master)

@qgib
Copy link
Contributor Author

qgib commented May 1, 2019

Author Name: Giovanni Manghi (@gioman)


  • status_id was changed from Reopened to Open

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Forms labels May 25, 2019
@signedav
Copy link
Contributor

signedav commented Sep 30, 2019

The tested behavior on current master is like this with GeoPackage source:

  • text data in text edit widget: null representing value is grey/italic and on mouse click selected, but not removed - medium nice but okay
  • integer in range widget: null representing value is black/nontitalic on mouse click disappears - nice
  • integer in text edit widget: null representing value is grey/nonitalic and on text enter disappears - nice
  • real in range widget: null representing value is black/nontitalic on mouse click nothing happens (cursor in the middle of the word NULL) - not nice!
  • real in text edit widget: null representing value is grey/nonitalic and on text enter disappears - nice

Do you confirm @gacarrillor ?

@signedav signedav self-assigned this Sep 30, 2019
@gioman gioman added the Feedback Waiting on the submitter for answers label Sep 30, 2019
signedav added a commit to signedav/QGIS that referenced this issue Sep 30, 2019
@gacarrillor
Copy link
Member

gacarrillor commented Oct 2, 2019

Hi @signedav, using the latest build I have available, I can confirm what you mentioned.

Did you consider date/time fields? Because they also have this behaviour (see GIF, field: fin_vida_util_version): Grey and italic NULL value and on click the NULL remains there.

@signedav
Copy link
Contributor

signedav commented Oct 3, 2019

Okay @gacarrillor I haven't noticed that.
Then it needs another fix.

  • null representing value is grey/italic and on mouse click on null representing text it changes to current date placeholder text in gray, what can be edited -> that's fine.

  • null representing value is grey/italic and on mouse click on null representing text nothing happens (cursor at the of the word NULL) -> has to be fixed

  • date is entered on clear-button-click the null representing text appears, and focus is lost (and then on click the behavior above) -> should not loose focus and display the current date placeholder text in grey

datetimenull

@signedav
Copy link
Contributor

PR #32158 is merged. So datetime widgets have a consistent behavior as well now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers Forms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants