Edgewall Software
Modify

Opened 7 years ago

Last modified 4 years ago

#12893 new defect

Empty time values should be stored as NULL

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

Attachments (0)

Change History (5)

comment:1 by Ryan J Ollos, 7 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)

comment:5 by Ryan J Ollos, 4 years ago

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

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.