[rt-users] imports with the offline tool not taking resolved date

Stephen Turner sturner at MIT.EDU
Wed Apr 9 09:25:19 EDT 2008

At Tuesday 4/8/2008 07:29 PM, Aaron Sallade wrote:
>The offline tool sets the Closed/Resolved timestamp to Now, instead 
>of taking the value from the import file. Any known work arounds?
This is happening for tickets marked 'resolved' in the import file, 
right? It appears that RT will set the resolved date to Now when it 
sets the status to resolved, overriding any value you specify in the file.

We came up with a kludgey workaround, but it's only good if a) this 
is a one-time load process, not a regular event, and b) you don't use 
the ticket Starts date for anything.

Anyway, what we did is:

- In the upload file, put the 'resolved' date in the Starts field
instead of Resolved.

- For each queue you are loading, create the following scrip:

     - Condition: On Resolve
     - Action: User Defined
     - Template: Global template: Blank

     In the scrip's  "Custom action preparation code:" box, put:

        return 0 unless $self->TicketObj->Starts;

     In the scrip's "Custom action cleanup code:" box, put:

        $self->TicketObj->SetStarts(' ');

So when these 'resolved' tickets are loaded, RT will first create then
resolve them. When it resolves them, the scrip will cause it to immediately
update the resolved date to what you put in the Starts date. It will then
clear out the Starts date.

As I say, this really is only useful for a one-time load, for a queue 
that isn't "live" yet. You wouldn't want this scrip to be active when 
you are working with tickets day-to-day.



Stephen Turner
Senior Programmer/Analyst - SAIS
MIT Information Services and Technology (IS&T)

More information about the rt-users mailing list