Edgewall Software

Opened 7 years ago

Last modified 3 years ago

#12893 new defect

Empty time values should be stored as NULL — at Version 1

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone: next-dev-1.7.x
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

Empty time values in the ticket system are stored as 0. They should probably be stored as NULL instead. Example: Version.update

sqlite> SELECT time FROM version;
0
1496041616000000
1472327798000000
0
0

The issue is caused by behavior of to_utimestamp. We should add a helper function and use in trac.ticket.model:

def _to_timestamp(time):
    return to_utimestamp(time) if time else None

Change History (1)

comment:1 by Ryan J Ollos, 6 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.