Bug 92725 - Adding new record in table duplicates values in previous field
Summary: Adding new record in table duplicates values in previous field
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.0.0.3 rc
Hardware: All All
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:5.1.0 target:5.0.1 target:5.0.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-07-14 08:42 UTC by David Burleigh
Modified: 2016-10-25 19:24 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Try to insert new value - will show value of previous record first (3.32 KB, application/vnd.oasis.opendocument.database)
2015-07-21 19:31 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Burleigh 2015-07-14 08:42:21 UTC
In the Table view, when adding a new record, the value of the field in the previous record is automatically duplicated in the new record and must be overwritten with the intended value for the new record. This is different from the behavior in version 4.x and all previous version that I have used, and is very undesirable.
Comment 1 Alex Thurgood 2015-07-14 15:11:01 UTC
Confirming on

Version: 5.1.0.0.alpha1+
Build ID: 7f0161d88e3a496361e2209d31cc7e9ef42a677e
Locale: fr-FR (fr.UTF-8)

OSX 10.10.4

regression over 4432

It is :
- really annoying ;
- prone to produce erroneous data entry.

Hoping that this isn't some "feature" that has been recently implemented.
Comment 2 Steve 2015-07-21 19:02:49 UTC
Confirming on

Version: 5.0.0.3rc
Locale: en-US

Win7 SP1 x64

Alex is correct, this is REALLY annoying!  Corrupted 800+ rows.  Thank goodness for backups!
Comment 3 Lionel Elie Mamane 2015-07-21 19:17:28 UTC
David, Alex, Steve, if one of you could upload an example .odb, and give click-per-click instructions (for someone not familiar with Base), that would be nice, since it would allow QA to bibisect the issue (find the change that introduced the bug, or at least narrow it down to a small range).

Or do the bibisect :) https://wiki.documentfoundation.org/QA/Bibisect
Comment 4 Lionel Elie Mamane 2015-07-21 19:21:28 UTC
(In reply to Steve from comment #2)

> Corrupted 800+ rows.  Thank goodness for backups!

Steve, your comment makes me think that maybe you hit a different issue / bug, since you seem to have corrupted *existing* data (*existing* rows), but David and Alex seem to be describing an issue only about *newly* *inserted* rows.

Can you please confirm? If you have another bug, please describe it in a new bugzilla entry, and CC the rest of us into it. Thanks!
Comment 5 Robert Großkopf 2015-07-21 19:31:16 UTC
Created attachment 117369 [details]
Try to insert new value - will show value of previous record first

Could be this is a new feature.
Open the attached database.
Open the table for editing.
Click with the mouse in the new row for "forename". 
There will be shown the content of the previous row. It will be marked and will be overwritable.

Click with the mouse in the first row.
Then click with the mouse in the new row for "forename".
There will be shown the content of the first row. It will also be marked and overwritable.

Don't know if this feature is a critical feature ...
Comment 6 Steve 2015-07-22 01:39:50 UTC
(In reply to Lionel Elie Mamane from comment #4)
> (In reply to Steve from comment #2)
> 
> > Corrupted 800+ rows.  Thank goodness for backups!
> 
> Steve, your comment makes me think that maybe you hit a different issue /
> bug, since you seem to have corrupted *existing* data (*existing* rows), but
> David and Alex seem to be describing an issue only about *newly* *inserted*
> rows.
> 
> Can you please confirm? If you have another bug, please describe it in a new
> bugzilla entry, and CC the rest of us into it. Thanks!


Lionel, my apologies!  Bad wording on my part.  

It does in fact only affect newly inserted rows.

Behavior in my database is exactly as noted by Robert in Comment #5, and I can duplicate it with his sample database as well.
Comment 7 Lionel Elie Mamane 2015-07-22 10:26:33 UTC
OK, reproduced. It is less serious than I thought. The "value from previous row" (which is from the last selected row, not the last row of the table) is prefilled, but it is *not* saved unless one actually edits it.

The prefilling happens only on the field that has focus, not the whole row.

But in my test, it happens also in existing rows, as soon as a field is NULL (empty), it happens in that field. It is not saved unless one edits it, even if one edits another field.
Comment 8 Commit Notification 2015-07-22 14:36:56 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3b9e66fdcade5a222a9dc99ad74627473b1fd4e7

tdf#92725 FormattedField: when model value is NULL, force empty display string

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2015-07-23 19:32:41 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bcca7b95d60fadfbaf93b542c110e177e838db8a&h=libreoffice-5-0

tdf#92725 FormattedField: when model value is NULL, force empty display string

It will be available in 5.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2015-07-24 13:41:00 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-5-0-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=07ce7182fc7115292aea8f5bd43f4f983c1eb1a3&h=libreoffice-5-0-0

tdf#92725 FormattedField: when model value is NULL, force empty display string

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.