Bug 42905 - Wizard table: Remove autovalue from step2 which doesn't work since there's already autovalue in step3 which works.
Summary: Wizard table: Remove autovalue from step2 which doesn't work since there's al...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Tables
  Show dependency treegraph
 
Reported: 2011-11-14 02:18 UTC by Jurgen
Modified: 2024-02-05 03:12 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
select AutoValue ore not it is the same (39.37 KB, image/jpeg)
2011-11-14 02:18 UTC, Jurgen
Details
Use existing field and auto value (53.60 KB, image/jpeg)
2011-11-14 02:31 UTC, Jurgen
Details
Table without auto value ID field (76.30 KB, image/jpeg)
2011-11-14 02:33 UTC, Jurgen
Details
stacktrace when selecting autovalue with increment (91.76 KB, image/png)
2012-03-24 00:50 UTC, Julien Nabet
Details
patch to remove autoincrement-statement field (1.50 KB, text/plain)
2018-09-18 20:07 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jurgen 2011-11-14 02:18:42 UTC
Created attachment 53502 [details]
select AutoValue ore not it is the same

I think this is a old bug but I don't find any report

1. Create a new table with the wizard select a ID field
2. in the set Field types step select AutoValue (ore not it is the same)
3. in next step, set primary key > select: use an existing field as primary key and Auto value  
4. Create the table and the field is without the auto value 

Adding automatically a primary key works perfect but not with a selected field.
Comment 1 Jurgen 2011-11-14 02:31:11 UTC
Created attachment 53503 [details]
Use existing field and auto value
Comment 2 Jurgen 2011-11-14 02:33:33 UTC
Created attachment 53504 [details]
Table without auto value ID field
Comment 3 Julien Nabet 2012-03-24 00:50:05 UTC
Created attachment 58957 [details]
stacktrace when selecting autovalue with increment

On pc Debian x86-64 with 3.5 branch updated yesterday, I reproduced this behaviour.
I tried to add an autoincrement value but had a message containing a stacktrace attached.

I'm compiling sources master (future 3.6), I'll try with it as soon as it's finished.
Comment 4 Alex Thurgood 2015-01-03 17:38:05 UTC Comment hidden (no-value)
Comment 5 QA Administrators 2016-01-17 20:01:50 UTC Comment hidden (obsolete)
Comment 6 Jurgen 2016-01-18 08:01:11 UTC
I have tried on last LibreOffice and the bug still exist.
But now I don´t use the Base component, it haven't any change in the last years.
Comment 7 QA Administrators 2017-03-06 13:43:59 UTC Comment hidden (obsolete)
Comment 8 Julien Nabet 2018-09-16 07:37:40 UTC
It seems the auto-increment statement needs to be filled.
For example, if you put AutoValue="Yes" and type "IDENTITY" in auto-increment statement field, it'll work.
Of course, it works if it's an hsqldb embedded db. With Firebird embedded type, it won't work, you must type "GENERATED BY DEFAULT AS IDENTITY".

I must recognize it's not very intuitive, I see 2 possibilities to improve the situation here when putting AutoValue" to "Yes":
1) Fill the auto-increment statement field by default with auto-increment statement of the related DB.
or
2) Letting the empty auto-increment statement field by default and at the end, then if autovalue has been selected and auto-increment statement field has been let empty, retrieve the by default value

Any thoughts?
Comment 9 Julien Nabet 2018-09-16 07:49:53 UTC
A third possibility:
- remove auto-increment statement field and just auto-increment statement related to the db by default to create the table.
(like in Design table).
Advantages:
- simplification
- avoid UI bug at least on my laptop, "auto-increment statement" doesn't appear fully, the string is truncated.

(Of course, if you want to specify a bit more the column, you can still use an alter table in SQL command.)
Comment 10 Robert Großkopf 2018-09-16 09:32:59 UTC
The third steps works as expected for creating an AutoValue. It will work with internal HSQLDB and also with internal Firebird. Tested with LO 6.1.1.2 on OpenSUSE.

We should remove the creating of an AutoValue in the second step, where also fields will be defined. You could add there a field like ID for INTEGER-values and could create the primary key in the third step and set it as AutoValue. 

Input of an autoincrement-statement is nothing for database-beginners. Who would know it? The wizard, I think, is created for these persons.
Comment 11 Julien Nabet 2018-09-16 18:55:31 UTC
(In reply to robert from comment #10)
> The third steps works as expected for creating an AutoValue. It will work
> with internal HSQLDB and also with internal Firebird. Tested with LO 6.1.1.2
> on OpenSUSE.
Indeed! I just tested this, it worked!

> We should remove the creating of an AutoValue in the second step, where also
> fields will be defined. You could add there a field like ID for
> INTEGER-values and could create the primary key in the third step and set it
> as AutoValue. 
Even more simplification than 3rd, I like this!

> Input of an autoincrement-statement is nothing for database-beginners. Who
> would know it? The wizard, I think, is created for these persons.
Agree with this.

Is everyone ok to remove the AutoValue (from second step) + autoincrement-statement fields?
Or rather is someone against it and why? Perhaps I'm a bit too quick and it'd need some UX debate?
Comment 12 Heiko Tietze 2018-09-17 09:54:27 UTC
(In reply to Julien Nabet from comment #11)
> Perhaps I'm a bit too quick and it'd need some UX debate?

Don't think there is much to add from UX fellows. Suggestions sounds reasonable, go for it.
Comment 13 Julien Nabet 2018-09-17 10:00:58 UTC
Thank you Heiko for your feedback.
I'll take this one then.
Comment 14 Julien Nabet 2018-09-18 20:07:08 UTC
Created attachment 145001 [details]
patch to remove autoincrement-statement field
Comment 15 Julien Nabet 2018-09-18 20:11:26 UTC
Unassign myself because I don't think I'll make it.
I find it difficult to disentangle autovalue field in steps 2 and 3 from wizard + autovalue present when editing table.

I attached a patch to remove autostatement value but not sure it's a clean one.
Comment 16 Julien Nabet 2018-09-18 20:21:18 UTC
Comment on attachment 145001 [details]
patch to remove autoincrement-statement field

Patch is wrong since it removes at least the display of "Default value" field when putting "Autovalue" to "No".
Comment 17 Julien Nabet 2018-09-19 22:06:53 UTC
I tried to find the code location in Java part, since it should be easy to disable/remove the elems from Java part, so I started from wizards/com/sun/star/wizards/table/TableWizard.java, got some elems from step 3 in PrimaryKeyHandler.java of the same directory.
Then FieldFormatter.java gives some elems too but nothing about autovalue, entry required, ... fields. It seems wrapped into something but don't know how and where.

I tried to get a bt from OFieldDescControl::ActivateAggregate but it can't go up to java sources, gdb goes until
/home/julien/lo/libreoffice/bridges/source/jni_uno/jni_java2uno.cxx
but nothing more.
So I tried to display jo_method but gdb doesn't know how to deal with jstring.
(+ nothing about gdb and jstring on Google)

In brief, completely stuck.
Comment 18 QA Administrators 2021-07-31 05:48:35 UTC Comment hidden (obsolete)
Comment 19 Robert Großkopf 2021-07-31 13:58:35 UTC
Still the same buggy behavior in 
Version: 7.2.0.2 / LibreOffice Community
Build ID: 614be4f5c67816389257027dc5e56c801a547089
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 20 Robert Großkopf 2022-02-04 14:56:07 UTC
Tested this again:
AutoValue won't be created, if AutoValue is set in step 2 of the wizard.
AuoValue will be created for an existing field, if AutoValue is set only in step 3 of the wizard.
We should remove AutoValue from step 2 and the bug will be gone.

Tested with LO 7.3.0.3 on OpenSUSE 15.3 64bit rpm Linux.
Comment 21 QA Administrators 2024-02-05 03:12:10 UTC
Dear Jurgen,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug