Bug 483868 - Error message when saving multiple tabs with unsaved changes
Summary: Error message when saving multiple tabs with unsaved changes
Status: CONFIRMED
Alias: None
Product: KEXI
Classification: Applications
Component: General (show other bugs)
Version: 3.2.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Kexi Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-17 21:40 UTC by Jon
Modified: 2024-03-17 22:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Please see attached video for demonstration of bug. (1.83 MB, video/x-matroska)
2024-03-17 21:40 UTC, Jon
Details
Test file with table + form (36.00 KB, application/x-kexiproject-sqlite2)
2024-03-17 22:33 UTC, Jarosław Staniek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon 2024-03-17 21:40:20 UTC
Created attachment 167389 [details]
Please see attached video for demonstration of bug.

SUMMARY
If user has performed design changes on a form, and then performs changes on a table it's using, Kexi will warn user that the form changes are unsaved, and present an option to save them before continuing. When this option is accepted, though, Kexi presents user with an error message saying that it could not save the form object.

STEPS TO REPRODUCE
1. Create new blank database.
2. Create a new table, give it a primary key, and fill another field with some data. Save but do not close.
3. Create a new form. It should be in its own tab next to the tab for the table.
4. Set form's Data Source to the table you just made.
5. Drop a text box into the form's design. Set its widget data source to a field in your table. 
6. Save form.
7. Make any change to the form's design, so that an asterisk appears next to the object name in its tab.
8. Without saving the form, go back to the table tab.
9. Make any change to the table, such as a field's datatype, or to one of the fields' properties.
10. Click Save.  
11. Click Close Windows & Save.
12. Click Save.

OBSERVED RESULT
Error message received saying "Saving '[object name]' object failed."

EXPECTED RESULT
Successful save of both open tabs/objects, or, if the table change is not allowed, a message describing steps to take.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu Studio 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Please see attached video for demonstration of bug.
Comment 1 Jarosław Staniek 2024-03-17 22:32:28 UTC
Thank you Jon. Confirming! I'm grateful that you've attached the video, it save time.

For the record:
- Step 8 is the main reason - the unsaved dependent object (i.e. form) causes the issue
- Current workaround is to save the dependent objects before saving changes in the main object (i.e. table)
Comment 2 Jarosław Staniek 2024-03-17 22:33:28 UTC
Created attachment 167390 [details]
Test file with table + form