Bug 75354 - EDITING: Base TABLE Editor not updating table FIELDS properly when both FIELD NAME and FILED TYPE are changed
Summary: EDITING: Base TABLE Editor not updating table FIELDS properly when both FIELD...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86 (IA32) Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Tables
  Show dependency treegraph
 
Reported: 2014-02-22 06:43 UTC by Kevin Suo
Modified: 2022-11-08 13:56 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2014-02-22 06:43:50 UTC
In LibreOffice Base, the Table Editor is not updating table FIELDS properly when both FIELD NAME and FILED TYPE are changed.

Steps to reproduce:
1. New base TABLE in design mode, Fields: 
ID (Integer, AutoVaule, Primary Key);
AGE (Tiny Interger).
Save.

2. OPEN the TABLE and insert a row of data:
AGE: 28
Save.

3. EDIT the TABLE fields:
change "AGE (Tiny Integer)" to "DATE_OF_BIRTH (Date)", save.
A warning window shows up.

4. When choose NO, the FIELD NAME is back to "AGE" and the save button is greyed-out. Close the EDIT window.

5. OPEN the above TABLE to see the columns and rows. You will see the 2nd column is "DATE_OF_BIRTH" rather than "AGE". However, in TABLE design mode (EDIT), the 2nd column is still "AGE". At this stage nothing can be done to correct the difference in EDIT mode.

6. Quit EDIT mode, go to VIEW and hit Refesh Tables, the field become "DATE_OF_BIRTH" in EDIT mode.

Expected:
Table editor accept the changes of FIELD NAME and FIELD TYPE, and refresh to shows the correct FIELD NAME and FIELD TYPE in step 5.

Ubuntu 13.10 x86, LibreOffice 4.1.5.3 and 4.2.1.1.
Comment 1 Kevin Suo 2014-02-22 06:45:18 UTC
Adding my earlier report Bug 75129 as "see also".
Comment 2 Robert Großkopf 2014-02-22 08:05:21 UTC
I could confirm the bug.
I created a table and saved it and put some values in the fields.
Then I opened it again for changed the name and the fieldtype for one field from "Age" and "TINYINT" to "Birthdate" and "DATE".
A warning appears:
The column "Birthadte" could not be changed ...
Notice: The name of the column has been "Age". "Birthdate" should be the new name. I could see in the background: The name has been changed to "Birthdate"
If I press "No" for changing the fieldtype to "DATE". The fieldtype isn't changed but the fieldname is also shon as if it isn't changed. There I could see "Age".
When I open the table for input I could see the renamend field "Birthdate". I have to go to View → Refresh Tables. After this action the table-editor noticed the new name "Birthdate".

This happens with all LO-Versions, beginning with LO 3.3.0Beta1. So I set the version to "Inherited from OOo".
Comment 3 Alex Thurgood 2015-01-03 17:38:34 UTC Comment hidden (no-value)
Comment 4 QA Administrators 2016-01-17 20:02:57 UTC Comment hidden (obsolete)
Comment 5 Robert Großkopf 2016-01-24 18:35:56 UTC
The bug still exists. 
Note: The fieldname has been changed, but isn't shown right while editing the table, only shown right while input new data.

The fieldtype couldn't be changed. Internal HSQLDB could not change a type from Tiny Integer to Date.

If you only want to change the fieldname this will work. So the dialog, which appears, is misleading.
Tested with LO 5.1.0.2 OpenSUSE 42.1 Leap 64bit rpm Linux
Comment 6 QA Administrators 2017-03-06 14:01:15 UTC Comment hidden (obsolete)
Comment 7 Robert Großkopf 2017-03-06 16:32:54 UTC
Bug still exists in LO 5.3.1.1, OpenSUSE Leap 42.1 64bit rpm Linux.

Note: The fieldname has been changed, but isn't shown right while editing the table, only shown right while input new data.
Comment 8 QA Administrators 2018-03-07 03:42:01 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2021-04-12 03:31:53 UTC Comment hidden (obsolete)
Comment 10 Jorge Teixeira 2022-11-07 21:06:23 UTC
Bug still exists in LO 7.4.2.3 by following the steps in the reproducer.

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: pt-PT (pt_PT); UI: en-US
Calc: threaded