Before physical altering or deleting table ask the user to close depending table/query/report/form
Summary: If table T is altered, before saving: - close all table views that use T in lookup fields - close all query views that use T - close all query views that use tables having T in lookup fields - close all tables that use queries in lookup fields and the queries use T Similarly, close all forms/reports that use tables this way. Any views are affected (data, design, text). Also: - improve existing question messages - remove Report's extended data source GUI BUG:371896 FIXED-IN:3.1.0 Test Plan: Use the test Kexi file (uncompress before testing): {F4442302} Test 1.1: If table T is altered, before saving close all table views that use T in lookup fields. 1. Open ownership table in data view. 2. Design the persons table, rename the last (Extra) field to something else, save design. 3. Expected: Kexi asks to close the ownership table. On agreement, they are closed and the design is saved. Test 1.2. Like 1.1 but open ownership table in design view. Expected result: like in 1.1. Test 2.1. If table T is altered, before saving close all query views that use T. 1. Open persons_and_cars query in data view. 2. Design the persons table, rename the last field to something else, save design. 3. Expected: Kexi asks to close the persons_and_cars query. On agreement, they are closed and the design is saved. Test 2.2. Like 2.1 but open the query in design view. Expected result: like in 2.1. Test 2.3. Like 2.1 but open the query in SQL view. Expected result: like in 2.1. Test 2.4. Like 2.1 but also open the **ownership table** after 2nd step. Expected result: Kexi asks to close both the ownership table and the persons_and_cars query. On agreement, they are closed and the design is saved. Test 2.5. Like 2.4 but also open the **persons form** before saving. Expected result: Kexi asks to close both the ownership table and the persons_and_cars query and the persons form. On agreement, they are closed and the design is saved. Test 2.6. Like 2.5 but also open the **persons report** before saving. Expected result: Kexi asks to close both the ownership table and the persons_and_cars query and the persons form and the persons report. On agreement, they are closed and the design is saved. Test 3.1. If table T is altered, before saving close all query views that use tables having T in lookup fields. 1. Open ownership_desc query in data view. 2. Design the persons table, rename the last field to something else, save design. 3. Expected: Kexi asks to close the ownership_desc query. On agreement, they are closed and the design is saved. Test 3.2. Like 2.1 but open the table in design view. Expected result: like in 3.1. Test 4.1. If table T is altered, before saving close all tables that use queries in lookup fields if these queries use T. 1. Open with_lookup_query table in data view. 2. Design the persons table, rename the last field to something else, save design. 3. Expected: Kexi asks to close the with_lookup_query query. On agreement, they are closed and the design is saved. Test 4.2. Like 4.1 but open the table in design view. Expected result: like in 4.1. Test 5.1. Testing if Kexi detects dependency between **report cars** and designed **table cars** because the report uses query that uses the table. 1. Open report cars in preview. 2. Design the cars table, rename and field, try to save design (finally don't save unless you have backup of the database). 3. Expected: Kexi asks to close the report cars. Test 6.1. Improve existing question messages asking for approval for closing depending tabs: see if they sound are correct and look OK. Example: {F4440486} Test 7.1. (Extra test of functionality that was hard to separate to another patch). Updated "Report data source" page (removed Set button and the External data widgets). Test if setting table and query as data source works. Reviewers: piggz Reviewed By: piggz Tags: #kexi Maniphest Tasks: T7703, T7704 Differential Revision: https://phabricator.kde.org/D8118
Showing
- src/plugins/forms/kexidatasourcepage.cpp 10 additions, 1 deletionsrc/plugins/forms/kexidatasourcepage.cpp
- src/plugins/forms/kexidatasourcepage.h 7 additions, 1 deletionsrc/plugins/forms/kexidatasourcepage.h
- src/plugins/forms/kexiformpart.cpp 83 additions, 4 deletionssrc/plugins/forms/kexiformpart.cpp
- src/plugins/forms/kexiformpart.h 21 additions, 3 deletionssrc/plugins/forms/kexiformpart.h
- src/plugins/forms/kexiformview.cpp 10 additions, 2 deletionssrc/plugins/forms/kexiformview.cpp
- src/plugins/forms/kexiformview.h 1 addition, 1 deletionsrc/plugins/forms/kexiformview.h
- src/plugins/queries/kexiquerypart.cpp 75 additions, 5 deletionssrc/plugins/queries/kexiquerypart.cpp
- src/plugins/queries/kexiquerypart.h 33 additions, 1 deletionsrc/plugins/queries/kexiquerypart.h
- src/plugins/reports/KexiDBReportDataSource.cpp 42 additions, 35 deletionssrc/plugins/reports/KexiDBReportDataSource.cpp
- src/plugins/reports/KexiDBReportDataSource.h 5 additions, 2 deletionssrc/plugins/reports/KexiDBReportDataSource.h
- src/plugins/reports/kexireportdesignview.cpp 36 additions, 5 deletionssrc/plugins/reports/kexireportdesignview.cpp
- src/plugins/reports/kexireportdesignview.h 5 additions, 2 deletionssrc/plugins/reports/kexireportdesignview.h
- src/plugins/reports/kexireportpart.cpp 38 additions, 3 deletionssrc/plugins/reports/kexireportpart.cpp
- src/plugins/reports/kexireportpart.h 19 additions, 3 deletionssrc/plugins/reports/kexireportpart.h
- src/plugins/reports/kexireportview.cpp 2 additions, 18 deletionssrc/plugins/reports/kexireportview.cpp
- src/plugins/reports/kexisourceselector.cpp 10 additions, 25 deletionssrc/plugins/reports/kexisourceselector.cpp
- src/plugins/reports/kexisourceselector.h 15 additions, 1 deletionsrc/plugins/reports/kexisourceselector.h
- src/plugins/tables/kexitabledesignerview.cpp 13 additions, 8 deletionssrc/plugins/tables/kexitabledesignerview.cpp
- src/plugins/tables/kexitabledesignerview.h 1 addition, 1 deletionsrc/plugins/tables/kexitabledesignerview.h
- src/plugins/tables/kexitablepart.cpp 51 additions, 26 deletionssrc/plugins/tables/kexitablepart.cpp
Loading
Please register or sign in to comment