Opened 8 years ago

Last modified 6 years ago

#3216 new defect

Dropdown menu query_column in v.to.db shows columns of wrong table

Reported by: pvanbosgeo Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Default Version: unspecified
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

Concerns: The query_column option in the Query tab of the v.to.db function

Issue: when selecting layer 2 in the query_layer option, the dropdown menu of the query_column still shows the column name of the attribute table linked to layer 1 instead of the table linked to layer 2.

Warning: if one selects a column (e.g., VAR1) from the drop-down menu and runs v.to.db, a error is raised that "ERROR: Cannot open cursor: 'SELECT VAR1 FROM MYTAB WHERE cat = 15'"

Note: One can still type in the name of the required column, and the function will run without problem.

I am running GRASS 7.3 on Ubuntu 16.04

Attachments (1)

example.png (135.0 KB ) - added by pvanbosgeo 8 years ago.
Even though layer 2 is selected, the dropdown menu shows the column names of the table linked to layer 1

Download all attachments as: .zip

Change History (4)

by pvanbosgeo, 8 years ago

Attachment: example.png added

Even though layer 2 is selected, the dropdown menu shows the column names of the table linked to layer 1

in reply to:  description comment:1 by mlennert, 8 years ago

Replying to pvanbosgeo:

Concerns: The query_column option in the Query tab of the v.to.db function

Issue: when selecting layer 2 in the query_layer option, the dropdown menu of the query_column still shows the column name of the attribute table linked to layer 1 instead of the table linked to layer 2.

AFAIK, this is an issue in every single module where a list of columns comes from another source than the main 'map'. AFAIU, this is inherent to the way this widget is programmed in the GUI. ISTR that there have been discussions about this, but don't have the time to search for this. I would guess that the widget would need some parameter with the name and layer of the map from which to get the list of column...

comment:2 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:3 by martinl, 6 years ago

Milestone: 7.0.77.6.2

Unable to reproduce bug in GRASS 7.6.0

Note: See TracTickets for help on using tickets.