Bug 154620 - does not insert field between 2 fields in database table
Summary: does not insert field between 2 fields in database table
Status: RESOLVED DUPLICATE of bug 71224
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.5.2.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-05 10:54 UTC by Max Sebastian Saldaña
Modified: 2023-04-05 15:18 UTC (History)
1 user (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 Max Sebastian Saldaña 2023-04-05 10:54:33 UTC
Description:
When I try to insert a new field between 2 example fields in a books table, the title and author fields are already created. I want to insert the subtitle field, instead it creates it at the end of all the fields. That is, the button does not work as it should, but it creates a new field at the end of the table, it does not insert it

Steps to Reproduce:
1.elijo un campo por debajo al que quiero insertar
2.right click
3.insert row

Actual Results:
does not insert the row, but creates it after the last field of the table

Expected Results:
insert a field between 2 existing fields


Reproducible: Always


User Profile Reset: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: es
Module: TableDesign
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 Alex Thurgood 2023-04-05 15:06:56 UTC
@Max : for this to work at all, the underlying database engine must support the corresponding DDL (data definition language) allowing you to specify the addition of a new column and its position within the table schema.

The LO table definition UI is buggy and unfortunately doesn't allow you to do this. Either you must use the Tools > SQL menu and execute a DDL statement from there to effect the change, and then refresh the table view, or you have to save the ODB file after running the DDL statement, shut down LO and then reload the ODB file.

What you are currently describing with regard to the table definition UI is bug 71224, or possibly the even older bug 51605.

Marking as DUP of bug 71224.

*** This bug has been marked as a duplicate of bug 71224 ***
Comment 2 Alex Thurgood 2023-04-05 15:18:26 UTC
@Max : note that the earliest bug report related to this problem is 12 years old, the 2nd one (bug 71224) 10 years old, and even bug 109294 is 6 years old.

This should give you an indication that it is not an easy bug to solve, and probably will not be solved any time soon.

The reason is that the UI would have to be programmed to know when the backend db engine supported each of a number of various acceptable functions for adding a new field in a given position, or changing the position of a given field in the field order.

In fact, what would more likely happen is that specific UIs for each type of field order modification statement would have to be developed and made available to the user depending on the db engine. This is probably not a trivial coding task.