Skip to content

Commit

Permalink
Prep RT-Extension-Import-CSV 0.03
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Crome committed Sep 27, 2024
1 parent 34b8f3c commit fab46cd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Revision history for RT-Extension-Import-CSV

0.03 2024-09-27
- Allow migration of Told date field
- Fix pod errors and documentation bugs
- Additional configuration for Zendesk migration added

0.02 2024-09-19
- Improve handling of date/time values
- Improve log messages
Expand Down
2 changes: 1 addition & 1 deletion META.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requires:
resources:
license: http://opensource.org/licenses/gpl-license.php
repository: https://github.com/bestpractical/rt-extension-import-csv
version: '0.02'
version: '0.03'
x_module_install_rtx_version: '0.43'
x_requires_rt: 5.0.0
x_rt_too_new: 5.2.0
31 changes: 21 additions & 10 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@ CONFIGURATION
function.

In this configuration, the custom field Purchase Order ID must be
unique, and can accept accept a combination of values. To insert a row
with this config, RT must find no existing tickets, and for update RT
must only find a single matching row. If neither condition matches, the
CSV row is skipped.
unique. To insert a row with this config, RT must find no existing
tickets, and for update RT must only find a single matching row. If
neither condition matches, the CSV row is skipped.

Excluding Existing Tickets By Status
In the example above, when searching for an existing ticket for a PO, it
Expand Down Expand Up @@ -473,8 +472,8 @@ EXAMPLES

Putting it all together: migrating from Zendesk
It's possible to migrate from Zendesk to Request Tracker using multiple
imports defined above. Starting with a Zendesk trial site as a basis,
the following steps are necessary before a migration can begin:
imports defined above. The following steps are necessary before a
migration can begin:

Users must be exported via API
Unfortunately, Zendesk only provides an export for what RT considers
Expand All @@ -487,6 +486,15 @@ EXAMPLES
Any of the default lists of tickets in Zendesk can be exported to
CSV. See the Zendesk documentation for more information.

RT Priority field must be customized
Zendesk priorities do not align 1:1 with RT's by default. The
following can be dropped into your RT configuration to match
priorities between the two systems:

Set(%PriorityAsString,
Default => { None => 0, Low => 25, Normal => 50, High => 75, Urgent => 100 },
);

Exporting user information via the Zendesk API includes a bunch of
unnecessary values. For this import, the only columns that matter are
name and email.
Expand Down Expand Up @@ -525,8 +533,12 @@ EXAMPLES
'Requestor' => 'Requester',
'Created' => 'Requested',
'LastUpdated' => 'Updated',
'CF.Ticket Type' => 'Topic',
'CF.Channel' => 'Channel',
'CF.Topic' => 'Topic',
'Told' => 'Assignee updated',
'Priority' => sub {
my %priority = RT->Config->Get('PriorityAsString');
return $priority{ 'Default' }{ ($_[0]->{ 'Priority' }) };
},
);

Set( %CSVOptions, (
Expand All @@ -535,8 +547,7 @@ EXAMPLES
escape_char => '',
) );

(you'll need to create two ticket custom fields: Ticket Type and
Channel)
(you'll need to create a custom field named Topic)

If tickets were exported to a file named zendesk_tickets.csv, the
following command will import tickets into your RT instance:
Expand Down
2 changes: 1 addition & 1 deletion lib/RT/Extension/Import/CSV.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package RT::Extension::Import::CSV;
use Text::CSV_XS;
use Test::MockTime 'restore_time';

our $VERSION = '0.02';
our $VERSION = '0.03';

our( $CurrentRow, $CurrentLine, $UniqueFields );

Expand Down

0 comments on commit fab46cd

Please sign in to comment.