Bug report #12114

QGIS Server: proper handling of NULL values in GetFeatureInfo response

Added by Andreas Neumann over 4 years ago. Updated over 4 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:QGIS Server
Affected QGIS version:2.6.0 Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20308

Description

Currently, QGIS server does not properly display NULL values as "NULL" string. String data types appear as empty string "", numeric types appear as "0" - which is clearly wrong and misleading.

Intended behaviour:
QGIS should write "NULL" or the corresponding NULL-Value representation in the response of the GetFeatureInfo request.

Question:
in QGIS desktop we have a setting for in Settings -> Options -> data sources --> Representation of NULL values - how do we handle this in server context? An environment variable? Could "NULL" be the default, if no setting is specified?

Tested with PostgreSQL layers.

Associated revisions

Revision 1e9774fd
Added by Jürgen Fischer over 4 years ago

qgis server fixes:
  • support edit types based on edit widgets (adds qgis_gui dependency; fixes #12091)
  • show null values (fixes #12114)
  • only quote non-numeric non-null values in feature info
  • fix crash on exit
  • remove obsolete parser method and debug output

History

#1 Updated by Jürgen Fischer over 4 years ago

  • Assignee set to Jürgen Fischer

#2 Updated by Jürgen Fischer over 4 years ago

  • Status changed from Open to Closed

#3 Updated by Jürgen Fischer over 4 years ago

  • Status changed from Closed to In Progress

For the configuration QSettings is used. You can use the enviroment variable QGIS_OPTION_PATH to set where your ini file lives, put a QGIS.ini there and set the representation with:

[Qgis]
nullValue=foobar

#4 Updated by Jürgen Fischer over 4 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF