Bug 295502 - Field list in "Configure ASCII file" dialog doesn't auto-update
Summary: Field list in "Configure ASCII file" dialog doesn't auto-update
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: datasources (show other bugs)
Version: 2.0.4
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-08 00:46 UTC by D. V. Wiebe
Modified: 2013-05-22 21:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description D. V. Wiebe 2012-03-08 00:46:12 UTC
In the "General Options" section of the "Configure ASCII file" dialog box is a drop-down list of fields used in the "Interpret: <FOO> As: <BAR>" item.  This drop-down list is populated with the list of available fields (=columns) when the dialog box is opened.  However, the list of fields changes based on the rest of the datasource configuration (notably the Data Column Layout), yet the list of fields in the "Interpret: <FOO> As: <BAR>" option doesn't update.

STEPS TO REPRODUCE:
1. In the "Configure ASCII file" dialog, ensure that "Space/tab delimited" is selected.
2. Tools -> Data Wizard
3. In the datasource name box, enter the name of a comma-separated (CSV) ascii file with at least two columns
4. "Configure..." to open the "Configure ASCII file" dialog with this CSV file.  The dialog box should be primed with the first 100 lines of the specified CSV file. 
5. Check the field list drop-down box under "General Options".  It should have two fields listed: INDEX, and "Column 1".
6. Select "Custom delimiter" and input a comma in the associated text box.
7. Check the field list drop-down box again.

RESULT:

The field list drop-down box still contains only INDEX and "Column 1".

EXPECTED RESULT:

The field list drop-down box should contain a list of all fields in the datasource, and should change when the datasource configuration changes the fields available in the datasource.

WORK-AROUND

This bug can be worked around by modifying the datasource configuration as appropriate, pressing "OK" to close the dialog box and commit the configuration changes and then re-opening the dialog (which will cause the field list to be populated with the field list using the new configuration.)
Comment 1 Nicolas Brisset 2012-03-08 07:47:01 UTC
 I guess this is something that we'll have to rework when we implement the ASCII-formatted time options as discussed recently.
Comment 2 Netterfield 2013-05-22 21:09:09 UTC
SVN commit 1356053 by netterfield:

Update the field list in config widget when field name interpretation is
changed.


 M  +38 -0     datasources/ascii/asciiconfigwidget.cpp  
 M  +8 -0      datasources/ascii/asciiconfigwidget.h  
 M  +1 -0      libkst/datasource.h  
 M  +1 -0      libkstapp/datasourcedialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1356053