Bug 32505 - LibO Base - UI - Copy data dialog
Summary: LibO Base - UI - Copy data dialog
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Dialog Base-UX
  Show dependency treegraph
 
Reported: 2010-12-19 04:21 UTC by Enrique
Modified: 2018-10-02 07:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
1 - Pasting data (records) from Calc into a Base table (8.12 KB, image/png)
2010-12-19 04:21 UTC, Enrique
Details
2 - Wizard "Copy table", first screen (29.11 KB, image/png)
2010-12-19 04:22 UTC, Enrique
Details
3 - Wizard "Copy table", second screen (43.88 KB, image/png)
2010-12-19 04:24 UTC, Enrique
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique 2010-12-19 04:21:54 UTC
Created attachment 41253 [details]
1 - Pasting data (records) from Calc into a Base table

We use Base a lot to insert data into databases via JDBC. We open a csv-file in Calc, select all records, copy them, open Base, and paste the records into a table. (see screenshots)

This opens up the "Copy data" dialog in Base. There are 2 simple enhancements that would improve our productivity a lot:

1. Make the wizard resizable
We often work with long field names that do not fit into the 2 columns of "Source table" and "Destination table". (see scr-shot 3) That makes it harder and more time-consuming to match the right fields. It would be great if we could resize that dialog, so that the 2 columns of "Source table" and "Destination table" would become larger. (and thus the field names would fit)

2. Make Base automatically match the columns by their name
Most of the time, the source & destination table have exact the same field names and the same amount of fields.
However, when the dialog opens, they are nog aligned. (see scr-shot 3) We have to manually align them, every single time.
It would be really helpfull if there was an option to automatically align fields with the same name.

For example by adding an option "Align source & destination tables by field name" in the first screen of the wizard. This could be placed for example under the option "Use first line as column names". (see scr-shot 2)
Comment 1 Enrique 2010-12-19 04:22:54 UTC
Created attachment 41254 [details]
2 - Wizard "Copy table", first screen
Comment 2 Enrique 2010-12-19 04:24:08 UTC
Created attachment 41255 [details]
3 - Wizard "Copy table", second screen
Comment 3 Yifan Jiang 2010-12-19 23:53:40 UTC
Hi Enrique,

Thanks for the ideas.

> 2. Make Base automatically match the columns by their name
> Most of the time, the source & destination table have exact the same field
> names and the same amount of fields.
> However, when the dialog opens, they are nog aligned. (see scr-shot 3) We have
> to manually align them, every single time.
> It would be really helpfull if there was an option to automatically align
> fields with the same name.

It looks like the wizard does not do extra sort for source/destination field names. So I guess if the 'first row' in CSV is exactly the same with the table fields both in name and order, they are expected to align in the wizard. Could it be a workaround in your case?
Comment 4 Enrique 2010-12-20 04:16:23 UTC
Hello Yifan,

the problem arises since both source & destination tables might have the same fields, but quite often they are not presented in the same order. 
(for example: the csv contains them alfabetically because the export routine of some application does it that way, and the fields of the destination table (PostgreSQL) are presented in the order they were created in that table.)

As a result, they are not aligned in the window "Assign columns". (see scr-shot 3) 
So we have to align them in the wizard
or in the csv before copy-pasting the info.
(Something we do over and over.)


1.Quick solution ?
------------------
A possible work-around would definitely be, to simply alfabetically sort all field names, in both the "source & destination table"-columns in the window "Assign columns".

That way, if both source & destination table:
- contain the same amount of fields,
- contain the same field names,
a simple sort would align them perfectally. (Thus resolving 90% of our problems!)

That would already be great. (In combination with making the window resizable for readability of longer field-names.)


2.An even more generic solution ?
---------------------------------
Of course, if both source & destination table do not contain:
- the same amount of field names
- the same field names
the "quick solution" does not resolve the problem entirely.

Example:

source              destination
field a             field a
field b             field aa
field bb            field b
field c             field c
field cc            field d
field d             field e
field e             field f
field f             field g
field g             field h
field z

An even more generic solution migth be to:
1. sort both source & destination fields (as in solution 1)
2. move all fields in both columns, that do not exist in the opposite column, to the bottom

That way, all linkable fields are linked together by means of their fieldname.
All not-linkable fields are shown at the bottom. Only those might have to be manually handled.

That would give in the example:

source              destination
field a             field a
field b             field b
field c             field c
field d             field d
field e             field e
field f             field f
field g             field g
field bb            field aa
field cc            field h
field z

This way, the first 7 fields are already correctly linked in the wizard.
(Their checkbox can automatically be "checked" in the source table-column.)
At the end of both columns, we find the fields that could not be matched automatically. (Those could be "unchecked" automatically in the source table-column.)


I hope this explanation gives you more information and is readable.
If you would like extra info, don't hesitate to contact me.
"Solution 2" seems very good, but "Solution 1" would already be a time-saver.

Thank you for your time !
Enrique.
Comment 5 Björn Michaelsen 2011-12-23 11:35:34 UTC Comment hidden (obsolete)
Comment 6 Florian Reisinger 2012-08-14 14:00:49 UTC Comment hidden (obsolete)
Comment 7 Florian Reisinger 2012-08-14 14:01:56 UTC Comment hidden (obsolete)
Comment 8 Florian Reisinger 2012-08-14 14:06:37 UTC Comment hidden (obsolete)
Comment 9 Florian Reisinger 2012-08-14 14:08:40 UTC Comment hidden (obsolete)
Comment 10 Enrique 2012-08-15 09:35:51 UTC
I created this issue for LibreOffice 3.3.0 RC1.
I can confirm this issue is still valid for LibreOffice 3.5.4 Build_ID 350m1(Build2).
Comment 11 Enrique 2012-08-15 09:47:26 UTC
This issue was created at the time for LibreOffice 3.3.0 RC1.
I have tested and can confirm this issue (enhancement) is still valid for LibreOffice 3.5.4 Build_ID 350m1(Build2).
I read the release notes for 3.6 and couldn't find any info regarding Base. So the issue should still be valid.

I reopened the bug, hoping someone can have a look at it. The wiki said "If you are an advanced QA member, feel free to do it yourself or help me and do it for me! "
Comment 12 Florian Reisinger 2012-08-15 11:23:27 UTC
Hi!

The problem was, that your bug was in NEEDINFO state...
Comment 13 QA Administrators 2014-10-23 17:32:21 UTC Comment hidden (obsolete)
Comment 14 Alex Thurgood 2015-01-03 17:39:45 UTC Comment hidden (no-value)