Modify

Opened 15 years ago

Closed 14 years ago

#5564 closed defect (duplicate)

Add support for importing the 'time' field

Reported by: J Evan S Owned by: François Granade
Priority: normal Component: TicketImportPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Defaulting to now is great but it would be nice when importing tickets from another system to be able to keep the original date issues were reported.

Attachments (0)

Change History (6)

comment:1 Changed 15 years ago by Steffen Hoffmann

Resolution: duplicate
Status: newclosed

This request - preserving historic dates on import - is already part of #4783. I'll mention this additional request there.

comment:2 Changed 14 years ago by Luiz Fernando

Resolution: duplicate
Status: closedreopened
Trac Release: 0.110.12

We've downloaded the last version ([9736]), however we still can't import the time field, keeping its original value given by CSV query export.

This problem implies in losing creation time information when changing tickets outside the Trac environment. (when using the procedure CSV query export > modify CSV > import)

Nice plug-in, keep the good work.

comment:3 Changed 14 years ago by Luiz Fernando

  • We've just realized that the time column can be ommitted in the csv file imported via this plug-in.
  • We were worried because the importer informed that the creation time field on all tickets imported would be changed to (now), because no time column was present.
  • However, we just realized that even importing with the 'time' column absent, the time field isn't changing on tickets, keeping the original database value. We reached this conclusion looking at this comment and code:
            # if 'set' is true, this will be the value that will be set by default (even if the default value in the Ticket class is different)
            # if 'set' is false, the value is computed by Trac and we don't have anything to do
            computedfields = {'status':      { 'value':'new',         'set': True },
                              'resolution' : { 'value': "''(None)''", 'set': False },
                              'reporter' :   { 'value': reporter,     'set': True  },
                              'time' :       { 'value': "''(now)''",  'set': False },
                              'changetime' : { 'value': "''(now)''",  'set': False } }
    

Are we right?

  • So, concluding, in order to make everything work smoothly, I just need to remove the modified and time columns from the Trac query exported csv file.

comment:4 in reply to:  3 ; Changed 14 years ago by J Evan S

Replying to luizfernando:

  • We've just realized that the time column can be ommitted in the csv file imported via this plug-in.
  • We were worried because the importer informed that the creation time field on all tickets imported would be changed to (now), because no time column was present.
  • However, we just realized that even importing with the 'time' column absent, the time field isn't changing on tickets, keeping the original database value. We reached this conclusion looking at this comment and code:

Right, creation time of existing Trac tickets won't be affected. Our concern was to preserve the creation time of tickets being imported from another system.

comment:5 Changed 14 years ago by anonymous

Trac Release: 0.120.11

comment:6 in reply to:  4 Changed 14 years ago by François Granade

Resolution: duplicate
Status: reopenedclosed

Replying to jevans:

Right, creation time of existing Trac tickets won't be affected.

Absolutely: and it's not specific to time fields: if you re-import modified tickets, the columns that aren't there will not be modified. To make sure you are not modifying things you don't want to modify, remove the columns that have no modifs is a good idea. Replying to jevans:

Our concern was to preserve the creation time of tickets being imported from another system.

I didn't plan for this usage scenario when I created this plugin... the main goal was to be able to create/edits tickets for one Trac instance in Excel, not to migrate things between two trac instances... I'm sure it could be implemented with limited work, any idea/patch is welcome.

In the meantime, I think that this ticket is still a dup of #4783 - closing as such.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain François Granade.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.