[Libreoffice-bugs] [Bug 122300] New: LibreOffice Base: Table Creation Wizard: Primary Key "AutoValue" does not populate after error.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Dec 24 03:01:04 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=122300

            Bug ID: 122300
           Summary: LibreOffice Base: Table Creation Wizard: Primary Key
                    "AutoValue" does not populate after error.
           Product: LibreOffice
           Version: 6.1.4.2 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: OldIronSides1797 at hotmail.com

Description:
The "AutoValue" field does not populate when erroneous entries during the Table
Creation Wizard cause an error at the end of the Table Creation Wizard. (i.e.
"Use Wizard to Create Table...")  

Steps to Reproduce:
REPRODUCING THE ERROR: 
1. To reproduce the error, start with a new LibreOffice Base database and open
the table Wizard to create a new table.  

2. Select "Create a new database" and Embedded database: "HSQLDB Embedded". 
- Then, click the "Next" button. 

3. In the next screen: "Decide How to Proceed After Saving the Database".
- Accept the default settings: 
- "Yes, register the database for me" 
- "Open the database for editing" 
- Then, click the "Finish" button.

4. The Save window will appear.
- Select a Name for the Database
- Save the file in a suitable location. 
- Click the "Save" button.

5. The LibreOffice Base Window will open. 
- Under the tasks select "Use Wizard to Create Table..."

6. The Table Wizard appears.
- Select the category: "Business".  
- Select the table sample: "MailingList" . 
- Select "MailingListID" from the available fields and add it to the selected
fields on the right. 
- Select "FirstName" and "Lastname" and add them to the selected fields on the
right. 
- Click the "Next" button.

8. In the "Set field types and formats" window, accept the defaults for
everything except the "AutoValue" of "MailingListID". 

9. For "MailingListID", change the AutoValue to "Yes".  
- Then, introduce an error by entering "0001" for the "Auto-increment statem". 
- Note: Entering "+1" also causes an error. 
- Click the "Next" button.

10.  Now the "Set the primary key" window appears.  
- Keep the default "Create a primary key" checked.  
- Then, choose "Use an existing field as a primary key". 
- Under the "Fieldname" drop down menu, choose "MailingListID". 
- For "Fieldname" keep the default setting with "Auto value" checked. 
- Click the "Next" button.

11. The "Create Table" window.
- Accept the default table name of "MailingList" 
- and the default setting "Insert data immediately".  
- Click on the "Finish" button. 

12. Immediately, an error message appears. 
- In this case it reads:
 "Unexpected token: 0001 in statement [CREATE TABLE "MailingList" 
("MailingListID" INTEGER NOT NULL 0001]".  
- Click the OK button to clear the error pop-up and go back to the wizard. 

13. Click the "Back" button twice so that you view the "Set field types and
formats" window.  
- Correct the error, by removing the "0001" from the "Auto-increment statem"
box. 
- Click the "next" button twice. 
Note: 
I would expect this correction to resolve the error but it does not. Instead
the the Table Creation Wizard must be started over and run without error before
the "Autovalue" works properly.

14. Finally, click the "Finish" button. 

15. The table will come up for editing.
- However, the "MailingListID" field does not "AutoValue" like it is supposed
to.  
- This "AutoValue" error prevents saving of the table and prevents saving any
records in the table.
- The following error message appears, when attempting to insert a new record:

"Error inserting the new record"
"Attempt to insert null into a non-nullable column: 
column:MailingListID 
table: MailingList 
in statement [INSERT INTO "MailingList" ("FirstName", "LastName") VALUES
(?,?)]"

Actual Results:
-Wizard allows for error to be introduced and does not explain what entries are
allowable.
-After error occurs backing up and correcting the error does not fix the error. 
-The error is only corrected if the Wizard is started over and run without
error.

Expected Results:
-The Table Wizard should not allow invalid entries.
-A help link should be included next to the "autovalue" option explaining what
suitable entries should be. 
-The "autovalue" field value should not be editable unless there is a reason to
edit it. 



Reproducible: Always


User Profile Reset: No



Additional Info:
NOTE: 
- Backing up and correcting the error within the wizard should fix the problem. 
- When an error like this occurs, it should not require starting over with a
new table.  
- The "AutoValue" failure only results when an error occurs during the wizard. 
- If no error occurs during the table creation wizard, the "AutoValue" works
properly as expected. 

NOTE: 
- Pertinent LibreOffice Help documentation: 
- (See Search Term: Database Wizard (Base))
- I was building a database to create address labels. So,...
- (See Search Term: labels;from databases)

LIBREOFFICE VERSION - In which bug was discovered:
Version: 6.1.4.2
Build ID: libreoffice-6.1.4.2-snap1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group threaded
(The release was provided by Canonical.)

OPERATING SYSTEM - On which LibreOffice was installed. 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

POSSIBLE RELATED BUGS:
Bug 108058 - After renaming Primary Key AutoValue feature fails

SUGGESTIONS:
- The potential of this error could be lessened, if the desired entry in the
"AutoValue" box was more clear.  A link next it giving explanation would be
helpful. 
- Also, the "AutoValue" box should not be editable, unless there is a reason
for changing it. 


INCLUDED SAMPLE FILES:
- Working database with functioning "Autovalue".
- Non-working database with non-functioning "Autovalue".

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181224/85e12f24/attachment.html>


More information about the Libreoffice-bugs mailing list