g3w-suite / g3w-admin

Server module for G3W-SUITE
https://g3w-suite.readthedocs.io/en/latest/g3wsuite_administration.html
Mozilla Public License 2.0
40 stars 34 forks source link

Wrong search filters for widget type "Value Relation" (key-value fields) #575

Open gisuser0 opened 1 year ago

gisuser0 commented 1 year ago

Checklist

Subject of the issue

The fields set in QGIS with the Widget Type "Value Relation" (pairs key-value) are correctly displayed using the single query button (the value is shown) while are not correctly displayed using the other bbox and polygon query buttons (the key is shown). This issue also affects the search tools (column search in the attribute table and search widget) since they search the key and not the values.

Steps to reproduce

image

image

Environment

Link to your project

No response

Additional info

No response

Raruto commented 1 year ago

Hi @gisuser0,

thanks for the report.


Here are some notes to speed up the review process:

  1. query the "buildings" layer with the different tools and check the different results of the attribute called "Subtype - Dependent on the value of Type"
  2. open the attribute table and search "A1" in the "Subtype - Dependent on the value of Type" column

Please also attach some self-explanatory images proving each of your statements (closer to each line is also better..)


  • browser: Chrome, Firefox, Safari
  • operating system: Windows, Linux, Mac OS

In this section, you should report only the information related to the environment you have already tested.

If you have really tested them all, please report each combination of tested software versions in detail (since for each operating system there are several versions available it is difficult find out which environment has already been tested..).


👋 Raruto

wlorenzetti commented 1 year ago

@gisuser0 thanks for the report, I think they will be fixed on next 3.7 version.

gisuser0 commented 1 year ago

@wlorenzetti and @Raruto, thanks for the reply. The browsers and the OS indicated above are used to reproduce the issue directly using the online-demo. Do I need to "attach some self-explanatory images proving each of my statements" or the issue is clear?

Raruto commented 1 year ago

I think they will be fixed on next 3.7 version.

@gisuser0 while you wait for a fix:

The browsers and the OS indicated above are used to reproduce the issue directly using the online-demo.

I've pointed out because some browsers are not available for all platforms and even the latest available versions may vary from one operating system to another.

Nothing dramatic but for the future please remember, when reporting your tests, to always write down the exact versions of each software used in order to speed up the work for those who can help you later (and also to make sure that you will be able to replicate them once solved).

Do I need to "attach some self-explanatory images proving each of my statements" or the issue is clear?

If it's feasible, also attach some images (or gif) within your first https://github.com/g3w-suite/g3w-admin/issues/575#issue-1833624681 in order to make it clearer.

That way, anyone who might run into this issue in the future should easily get an idea (although that link may be dead).

Thanks in advance for your cooperation, Raruto

gisuser0 commented 1 year ago

Thanks for the bug fixing. The problem of the attribute table is solved but the other two issues (feature info and search widget) related to the widget "Value Relation" seem to persist.

Step to reproduce:

image Figure 1

image Figure 2

Can this ticket be reopened or should a new one be added? Thanks in advance

Environment

wlorenzetti commented 1 year ago

Hi @gisuser0 , I fixed filter on attribute table, for fix QUERY BBOX LAYER QUERY BY POLYGON and QUERY BY DRAW POLYGON are not fixed, I have to make a qgis-plugin filter for WFS requests. Github action close the issue, but it was wrong I reopen the issue.

wlorenzetti commented 1 year ago

Querybuilder is correct because work with raw layer data.

gisuser0 commented 6 months ago

The problem related to the widget "Value Relation" seems to persist.

Step to reproduce:

  1. upload the demo project and data
  2. query the "buildings" layer with the "QUERY LAYER" button: the expected values (A1, A2, B1, ...) of the field called "Subtype - Dependent on the value of Type" are displayed (see left figure);
  3. query the "buildings" layer with the "QUERY BBOX LAYER" button: the unexpected keys (1, 2, 3, ...) of the field called "Subtype - Dependent on the value of Type" are displayed (see right figure). The same unexpected behavior occurs with the other two buttons "QUERY BY POLYGON" and "QUERY BY DRAW POLYGON";
  4. the issue is also visible on the field "Address": the expected value is displayed using the "QUERY LAYER" button and the unexpected key is shown using the "QUERY BY POLYGON" button;

image


Environment


Can this ticket be reopened or should a new one be added? Thanks in advance

Raruto commented 6 months ago

Maybe a @wlorenzetti oversight in https://github.com/g3w-suite/g3w-admin/issues/575#issuecomment-1684000445.

@gisuser0 wasn't referring to the QueryBuilder panel, but instead to the following map controls:

QUERY LAYER

image

QUERY BY BBOX

image

[g3wsdk.info]