Opened 11 years ago

Last modified 6 years ago

#4783 new defect

import preserving historic time stamps, needed i.e. for legacy projects

Reported by: anonymous Owned by: François Granade
Priority: normal Component: TicketImportPlugin
Severity: normal Keywords: create_time change_time
Cc: Trac Release: 0.11


Hello, We started using a project using Excel to maintain a log of tasks and the remaining time (on a daily basis) Is it possible to import tasks such that this information is updated in the ticket_change table so that the past dates are added.

For example:

TaskDateRem time
1 1/1/08 80
1 1/2/08 76

Now I want this information to get into the ticket and ticket_tables on the past date - not today's date.



Attachments (1)

t4783-support-time-field.diff (13.0 KB) - added by Jun Omae 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by Steffen Hoffmann

#5564 requested import of ticket (updates) with historic time stamps too, was closed a duplicate of this ticket, but there's no progress or solution so far.

comment:2 Changed 10 years ago by Steffen Hoffmann

Summary: Importing legacy projectsimport preserving historic time stamps, needed i.e. for legacy projects

comment:3 Changed 9 years ago by François Granade

see also comment:ticket:5564:4 and comment:ticket:5564:6 for the exact scope of this problem

comment:4 Changed 9 years ago by Jun Omae

I worked the issue and attached the patch, t4783-support-time-field.diff.

The values in time column of your uploading file is used for the ticket creations. However the values is NOT used for the ticket modifications.

Changed 9 years ago by Jun Omae

comment:5 Changed 9 years ago by Steffen Hoffmann

Keywords: create_time change_time added

#8357 has been fixed, adding ability to import date/time information for custom date/time fields as string. This is certainly not the same but a related issue.

comment:6 Changed 6 years ago by anonymous

Unfortunately, although an import with a changetime column is successful, it is then impossible to view the ticket, and the following traceback is produced:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/web/", line 497, in _dispatch_request
  File "/usr/lib/python2.7/site-packages/trac/web/", line 214, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.7/site-packages/trac/ticket/", line 179, in process_request
    return self._process_ticket_request(req)
  File "/usr/lib/python2.7/site-packages/trac/ticket/", line 528, in _process_ticket_request
    ticket = Ticket(self.env, id, version=version)
  File "/usr/lib/python2.7/site-packages/trac/ticket/", line 82, in __init__
  File "/usr/lib/python2.7/site-packages/trac/ticket/", line 127, in _fetch_ticket
    self.values[field] = from_utimestamp(value)
  File "/usr/lib/python2.7/site-packages/trac/util/", line 113, in from_utimestamp
    return _epoc + timedelta(microseconds=ts or 0)
TypeError: unsupported type for timedelta microseconds component: unicode
Last edited 6 years ago by Jun Omae (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain François Granade.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.