Hi,
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 );
SQL
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
$dbh->disconnect();
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,
Julien CAUNAN
Support Moyens De Tests
Av. Paul Gellos, BP 531 - 64105 - BAYONNE Cedex - FRANCE
julien.caunan@bmscircuits.com
Tél : +33 (0)5 59 58 41 51
Mob :
Fax : +33 (0)5 59 58 57 01
[http://nsa22.casimages.com/img/2012/03/06//120306085532380989.jpg]
[http://nsa21.casimages.com/img/2012/03/06//120306090312371802.jpg]Please consider your environmental responsibility before printing this e-mail