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

Automatic recognition of data types in forms #23440

Open
qgib opened this issue Sep 1, 2016 · 4 comments
Open

Automatic recognition of data types in forms #23440

qgib opened this issue Sep 1, 2016 · 4 comments

Comments

@qgib
Copy link
Contributor

qgib commented Sep 1, 2016

Author Name: Pablo Fernández Moniz (Pablo Fernández Moniz)
Original Redmine Issue: 15516

Redmine category:unknown


In the table below, the configuration for the test database is provided. The database has only a custom domain and a table called test.test created.

CREATE EXTENSION postgis;

DROP SCHEMA IF EXISTS test CASCADE;
CREATE SCHEMA test;

CREATE TYPE test.domain_test AS ENUM ('value1', 'value2', 'value3');

CREATE TABLE test.test
(
id bigint NOT NULL PRIMARY KEY,
geom geometry(Linestring, 32628),
date_field timestamp with time zone,
domain_field test.domain_test NOT NULL,
boolean_field boolean,
comments text
);

Database configuration

After we load the test table, if we check the properties of the layer fields by going to “Layer” > “Properties …” > “Fields” we can see that although the type name is correctly filled in, the edit widgets are always “Text Edit” by default:

image

With the default configuration, when we try to insert a new feature, every input box in the fold is a text edit box:

image

However, we want to make the process of entering data as easy as possible for our GIS user by providing the most useful widget for each data type. For example, something like:

image

In that case we had to manually set every field as it is shown in the image below:

image

The problem, besides to automatically recognition of data types, is that this manual process is quite tedious, time consuming (we have more close to one hundred tables) and error prone. Even if we provide to our users a prepared project with the correct configuration, the system could grow or they could have to configure the project again to add different layers.

Is there any utility in QGIS that could help us to make this process in an automatic way?


Related issue(s): #23441 (duplicates)
Redmine related issue(s): 15517


@qgib
Copy link
Contributor Author

qgib commented Sep 1, 2016

Author Name: Jürgen Fischer (@jef-n)


  • tracker_id was changed from 1 to 2

@qgib
Copy link
Contributor Author

qgib commented Sep 2, 2016

Author Name: Jürgen Fischer (@jef-n)


See also "PR#13499":#3439

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Sep 22, 2017

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as Unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants