Bug report #12928

Using form view to edit data, changes the attribute that uses Date/Time widget to current date

Added by Nhung Seidensticker almost 9 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Forms
Affected QGIS version:2.8.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:No Copied to github as #:21010

Description

Using QGIS 2.8.1 (64 bit) on Windows using Esri Shape file.
I have 2 data fields that uses the date/time widgit. One field contains dates of when a title was made (Date_title_Registered) and one that is set to when the data was entered (date_updated). If I enter my attributes via the attribute table (using table view) the attributes for both fields remains the same as when I entered it. However, when I switch to form view or use form view via the identify features tool, the date that I had previously entered for both fields is overwritten to the current date.
To reproduce the bug have a mappable table with a field that uses date/time widgit. Ensure you have different dates in this field (mixture of months, days, and years). Have the layer editable. Using the identify features tool click on the object, in the form view you will see that the date has been changed to the current date. Alternatively, select the feature and open the attribute table, switch to form view and notice that the date has been overwritten by the current.

TableView.PNG (64.7 KB) Nhung Seidensticker, 2015-06-10 12:30 AM

FormViewAT.PNG (90.8 KB) Nhung Seidensticker, 2015-06-10 12:30 AM

FormViewIF.PNG (61.4 KB) Nhung Seidensticker, 2015-06-10 12:30 AM

DateTime.PNG (214 KB) Nhung Seidensticker, 2015-06-15 06:32 PM

DataFormat.PNG (68.4 KB) Nhung Seidensticker, 2015-06-15 06:32 PM

History

#1 Updated by Matthias Kuhn almost 9 years ago

  • Status changed from Open to Feedback

Can you add

  • the data format that you are using
  • the widget configuration

#2 Updated by Matthias Kuhn almost 9 years ago

Just checked: works for me.

Can you check if the "field format" specified in the widget definition matches the format of the dates saved in your data.

#3 Updated by Giovanni Manghi almost 9 years ago

  • Category set to Forms

#4 Updated by Nhung Seidensticker almost 9 years ago

Hi Matthias,
Sorry, I was wrong I thought our spatial layer was an Esri Shape file. It's actually a MapInfo tab file that we pull from SQL. The field format in the widget does not match the format of the dates in the data ( I forgot to add the 'time'). I changed it to match but the data but the same thing happens, I still get the current date.

#5 Updated by Giovanni Manghi almost 9 years ago

Nhung Seidensticker wrote:

Hi Matthias,
Sorry, I was wrong I thought our spatial layer was an Esri Shape file. It's actually a MapInfo tab file that we pull from SQL. The field format in the widget does not match the format of the dates in the data ( I forgot to add the 'time'). I changed it to match but the data but the same thing happens, I still get the current date.

please add a sample project with data.

#6 Updated by Nhung Seidensticker almost 9 years ago

Hi Giovanni
My boss is away for another 2 weeks. I need permission. Will provide some sample data and project when I get the ok.

#7 Updated by Valdis Abele almost 9 years ago

Same (I think) problem for me.
If I don't use QT UI- everything is ok. With UI dates are getting updated to QDateTimeEdit's date even if I don't touch it. Date formats match in QT UI and QGIS.
Versions 2.8.2 and 2.9.0. 64bit on Win 8.1

#8 Updated by Giovanni Manghi over 8 years ago

  • Resolution set to not reproducable
  • Status changed from Feedback to Closed

Nhung Seidensticker wrote:

Hi Giovanni
My boss is away for another 2 weeks. I need permission. Will provide some sample data and project when I get the ok.

I also can't replicate here, please reopen if necessary, attaching a sample project+data.

Also available in: Atom PDF