Source date not recording in Accession Editor

Bug #857963 reported by Shane Litherland
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bauble
Fix Released
High
Unassigned

Bug Description

** aspects of this bug may have relevance to bug #856241 in respect to date formats **

In Accession Editor, on source tab, the date field to right of collection ID, does not seem to record to the db table. Further, if I open an existing accession to edit, and go only to this field and type in a date, the 'OK' and 'Next' buttons at bottom stay greyed out (GUI not recognising that I've just updated info in a field?) If I then go anywhere else and make another change the buttons become active, but even then when I hit OK, upon re-opening that record the source date is still blank.

If I go to the table 'collection' in postgresql, I note that the field is indeed blank for the relevant entry/ies. If I type in a date for an entry e.g 29/4/10, the table will save that value correctly (postgres still displays the date in yyyy-mm-dd format but it accepted me typing in as dd/m/yy probably because the locale setting is working).

When I then go back to bauble, refresh by hitting search button again and select relevant entry, on the source tab, the date shown beside collection id appears as 29/4/2010. So it is retrieving the date correctly from the table, and rearranging it from the postgres yyyy-mm-dd to dd/mm/yy to display it, so maybe Bauble is paying attention to locale stuff?? But note that for the same record, I can go to the 'general' tab, and dates for accesssioned or received show as dd-mm-yyyy. So, though trivial, why is one place using '-' and another '/' for date field separators?

Tags: date
Revision history for this message
brettatoms (brettatoms) wrote :

Yes, need to check if this is the same problem as https://bugs.launchpad.net/bauble/+bug/856241

It looks like in most cases when the widget values are being set editors (and probably elsewhere) the default date format isn't being respected. This could probably be fixed in most cases by updating bauble.utils.set_widget_value() to check for datetime.date values.

This has been fixed for the propagation editor in some cases but needs to be more thoroughly checked throughout the code.

Changed in bauble:
importance: Undecided → High
milestone: none → 1.0.10
status: New → Confirmed
Revision history for this message
brettatoms (brettatoms) wrote :

Fix released in r1392

Changed in bauble:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.