Bug 66662

Summary: Other: Autofield is not working for postgresql
Product: LibreOffice Reporter: Ali Joumma <ali.joumma>
Component: BaseAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED INVALID    
Severity: normal CC: ali.joumma
Priority: high    
Version: 4.0.3.3 release   
Hardware: Other   
OS: All   
Whiteboard: BSA
Crash report or crash signature: Regression By:

Description Ali Joumma 2013-07-07 10:54:47 UTC
Steps to reproduce:
if I create a table in postgresql, containing a field with a serial type as primary key,
and then I used Libreoffice Base with SDBC (postgresql) driver to edit the table

Current behavior:
first the ID field doesn't show "autofield" like it used to in previous versions,
second if I started to enter data and then I moved to another row or blur\lose focus from the current row, the ID becomes 0

also all the fields with default value (set from the table definition not from LO base) gets weird values when the row lose focus
e.g if the default value is "now()" instead of getting "2013-07-07" I get "now()" after the row lose focus

the only way to get the real ID and the correct default values is to hit the refresh button

the real issue is you can't save before you hit refresh (the ID is still 0) and sometimes you lose all the rows data when you press refresh 

Expected behavior:
in previous versions when I open the table the word "autofield" is written on the ID field, and when the current row lose focus\or press "save" the actual ID shows

and also the default values reflected automatically when the row lose focus
if it was "now()" when i lose focus the data field becomes "2013-07-07" same for custom functions


sidenote: before version 4.0.2.2 the ID field used to work fine but the default values had the same behavior of versions after 4.0.2.2
              
Operating System: All
Version: 4.0.3.3 release
Comment 1 Ali Joumma 2013-07-07 10:57:51 UTC
also i forgot to mention that i tested this in both Linux (archlinux\ubutunu) and windows xp (portable and setup)
i get the same results from the same version
Comment 2 Robert Großkopf 2013-07-24 19:10:25 UTC
This isn't a valid bug-report. You write many problems in one report. Please open a new report for every problem. I will do it for the problem with the autofield and close this bug as invalid.
See https://bugs.freedesktop.org/show_bug.cgi?id=67269
I set you in CC for the new bug-report.