I would like to have some informations about the differents possibilities of RT with this extension RT-Authen-ExternalAuth.

In fact, we work with the RT 3.8.8 and I would like to export to an other DB (Linux, Mysql…) some information about tickets.

Some personnes of my company have to clock their works (TimeWorked) everyday, there is an application to load their time worked, I would like to do that with RT from " What I did today" HTML page.

When they click on “Record all updates”, they update all their tickets and I would like to load on the other DB these timeworks. I wrote the Perl code that I wanted to insert in the “MyDay.html”.

In fact, the begening of the function is :

use warnings;
use strict;
use Time::Local;
use base qw(RT::CustomFieldValues);

use DBI; # Charger le module DBI
use vars qw/ $VERSION /; # Version du script
$VERSION = ‘1.0’;

Paramètres de connexion à la base de données

my $bd = ‘pointage’;
my $serveur = 'sqlxxxxxxx;

my $identifiant = ‘xxx’;
my $motdepasse = ‘xxxx’;

Connexion à la base de données MySQL

my $dbh = DBI->connect( “dbi:xxxxx:dbname=$bd;host=$serveur;”, $identifiant, $motdepasse )
or die “Connexion impossible à la base de données $bd !”;

Insertion des données

my $requete_sql_pointage = <<“SQL”;
INSERT INTO pointage ( matricule, sect, type-pointage, ordre, temps_passe, date_pointage, nom )
VALUES ( $owner, ‘S760044’, ‘2’, $args{Ordre Byo}, $worked, $day/$mon/$yr $hr:$min:$sec, $user );

my $sth_pointage = $dbh->prepare($requete_sql_pointage) or die $dbh->errstr;

$sth_pointage->execute( $owner, ‘S760044’, ‘2’, $args{Ordre Byo}, $worked, $day/$mon/$yr $hr:$min:$sec, $user )
or die “Echec Requête $requete_sql_pointage : $DBI::errstr”;

Déconnexion de la base de données


Can you tell me how can I do that ? And “extension RT-Authen-ExternalAuth”, would be it work in my case ? I 've this extension in my RT for an other function and it works.

Thank you for your help.

Best regards,

Support Moyens De Tests
Av. Paul Gellos, BP 531 - 64105 - BAYONNE Cedex - FRANCE
Tél : +33 (0)5 59 58 41 51
Mob :
Fax : +33 (0)5 59 58 57 01

[http://nsa21.casimages.com/img/2012/03/06//120306090312371802.jpg]Please consider your environmental responsibility before printing this e-mail

" Ce courriel et les documents qui lui sont joints peuvent contenir des informations confidentielles ou ayant un caractère privé. S’ils ne vous sont pas destinés, nous vous signalons qu’il est strictement interdit de les divulguer, de les reproduire ou d’en utiliser de quelque manière que ce soit le contenu. Si ce message vous a été transmis par erreur, merci d’en informer l’expéditeur et de supprimer immédiatement de votre système informatique ce courriel ainsi que tous les documents qui y sont attachés." ****** " This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, you are notified that any dissemination, copying of this e-mail and any attachments thereto or use of their contents by any means whatsoever is strictly prohibited. If you have received this e-mail in error, please advise the sender immediately and delete this e-mail and all attached documents from your computer system."