NAME

RT::Extension::Converter::RT1 - Handle the RT1 side of a conversion

SYNOPSIS

use RT::Extension::Converter::RT1;
my $converter = RT::Extension::Converter::RT1->new;

DESCRIPTION

Object that should be used by converter scripts to

METHODS

new

Returns a converter object after setting up things such as the config

config

Returns a config object

_handle

private method for the db handle of the RT1 database

_connect

conect to the RT1 database

_run_query

Takes a sql string and a list of placeholder values

_run_query( sql => $sql, placeholders => \@placeholders )

Returns a statement handle

_fetch_data

wrapper around _run_query to hide the boring bits of iterating over the data set and cleaning up when we get to the end of the data.

_sth

Stores several named sth's for this object (since multiple queries can be happening simultaneously).

Takes Name => sth for set Name for get

_clean_sth

finishes the sth and gets rid of it takes the name of the sth

get_user

Intended to be called in a loop. Wraps over the DBH iterator. When called for the first time, will fetch the users and returns one as a hashref. Will keep returning one until we run out.

get_queue

Intended to be called in a loop. Wraps over the DBH iterator. When called for the first time, will fetch the queues and returns one as a hashref. Will keep returning one until we run out.

get_area

Intended to be called in a loop. Wraps over the DBH iterator. When called for the first time, will fetch the areas for the queue and returns one as a hashref. Will keep returning one until we run out.

Takes one argument, Name => Queue's Name

get_queue_acl

Intended to be called in a loop. Wraps over the DBH iterator. When called for the first time, will fetch the acls for the queue and returns one as a hashref. Will keep returning one until we run out.

Takes one argument, Name => Queue's Name

get_ticket

Intended to be called in a loop. Wraps over the DBH iterator. When called for the first time, will fetch all tickets and return one as a hashref. Will keep returning one until we run out.

get_transactions

Takes the ticketid passed in and returns an arrayref of transaction data.

AUTHOR

Kevin Falcone <falcone@bestpractical.com>

LICENCE AND COPYRIGHT

Copyright (c) 2007, Best Practical Solutions, LLC. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.