Edgewall Software

Opened 7 years ago

Last modified 3 years ago

#12893 new defect

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

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:

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

Timestamps are stored in the following fields:

  • attachment.time
  • wiki.time
  • revision.time
  • ticket.time
  • ticket.changetime
  • ticket_change.time
  • milestone.due
  • milestone.completed
  • version.time
  • notification_subscription.time
  • notification_subscription.changetime

Change History (4)

comment:1 by Ryan J Ollos, 6 years ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 5 years ago

See also comment:20:ticket:11018. Empty time ticket custom field values are stored as NULL rather than an empty string.

comment:3 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.3.xnext-dev-1.5.x

Milestone renamed

comment:4 by Ryan J Ollos, 5 years ago

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