Bug 160294 - Base has strange behavior when setting auto value
Summary: Base has strange behavior when setting auto value
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
7.0 all versions
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-21 05:12 UTC by prrvchr
Modified: 2024-03-21 14:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Table design mode (38.54 KB, image/png)
2024-03-21 14:05 UTC, prrvchr
Details
Save change message (46.91 KB, image/png)
2024-03-21 14:05 UTC, prrvchr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description prrvchr 2024-03-21 05:12:33 UTC
Description:
I can change whether a column is autoincremented or not in the jdbcDriverOOo[1] driver.

When changing this option, by the drop-down list which depends on the column which is selected, if we validate the changes by the Save button (Ctr + S) while then did not take care to click again in the list of columns then the changes are saved but Base will ask you to save again before closing.

If after changing the auto value option, I click in the list of columns (it doesn't matter which one) and I save using the Save button then when I close this window, Base does not ask me anything...

Steps to Reproduce:
1. Edit a table in Base.
2. Try to modify the auto value option
3. Save and exit the table editing window
4. When you exit Base asks you to save again.

Actual Results:
Base asks to save the changes even though it has just been done.


Expected Results:
Base don't asks to save the changes.


Reproducible: Always


User Profile Reset: No

Additional Info:
If just before saving using the Save button you make sure to put the cursor back in the column grid (with a click on one of the columns) then everything will work correctly.

[1] https://prrvchr.github.io/jdbcDriverOOo/
Comment 1 m_a_riosv 2024-03-21 11:12:27 UTC
Maybe I'm wrong, but I think there are two different saves.
The first one is to save the table modification in the database file, then it is applied.
The second one is to save Base at exit, Base is a front-end, and has more components than the database, like configurations, forms, reports, queries, etc., not only the database, having in this case their database modified.
Comment 2 prrvchr 2024-03-21 14:05:25 UTC
Created attachment 193231 [details]
Table design mode
Comment 3 prrvchr 2024-03-21 14:05:57 UTC
Created attachment 193232 [details]
Save change message
Comment 4 prrvchr 2024-03-21 14:06:47 UTC
> The first one is to save the table modification in the database file, then it is applied.
> The second one is to save Base at exit, Base is a front-end, and has more components than the database, like configurations, forms, reports, queries, etc., not only the database, having in this case their database modified.

No, I'm not talking about the message that Base gives when you exit it, but a message that appears when you exit the design table. See attached screenshot
Comment 5 prrvchr 2024-03-21 14:13:06 UTC
Considering how I manage to reproduce this problem, it seems that it is linked to where the focus is in the window when clicking on the save button (Ctr + S). And apparently the focus must be moved in the grid for this to work.
Comment 6 prrvchr 2024-03-21 14:21:30 UTC
Well another problem is that I can't reproduce without the jdbcDriverOOo extension, since I can't find a driver that allows you to change the AutoValue option, save it using the Save button (Ctr + S) then finally exit the table design window in order to display the error message.
Comment 7 prrvchr 2024-03-21 14:32:04 UTC
After several tests I confirm that if the focus is on the AutoValue combobox and we save using the Save button then there will be the message asking to save when exiting the table design window.