<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle">
<!--
p
        {margin-top:0px;
        margin-bottom:0px}
-->
</style>
</head>
<body>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div>
<p>Hi,</p>
<p> </p>
<p>I would like to have some informations about the differents possibilities of RT with this extension RT-Authen-ExternalAuth.</p>
<p> </p>
<p>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.</p>
<p>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.</p>
<p> </p>
<p>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".</p>
<p> </p>
<p>In fact, the begening of the function is :</p>
<p> </p>
<p><font color="#800000">use warnings;  <br>
use strict;<br>
use Time::Local;<br>
use base qw(RT::CustomFieldValues);<br>
  <br>
use DBI;                    # Charger le module DBI  <br>
use vars qw/ $VERSION /;    # Version du script  <br>
$VERSION = '1.0';  <br>
  <br>
# Paramètres de connexion à la base de données  <br>
my $bd          = 'pointage';  <br>
my $serveur     = 'sqlxxxxxxx;    </font></p>
<p><font color="#800000">my $identifiant = 'xxx';          <br>
my $motdepasse  = 'xxxx';        </font></p>
<p><font color="#800000">  <br>
# Connexion à la base de données MySQL  <br>
my $dbh = DBI->connect( "dbi:xxxxx:dbname=$bd;host=$serveur;", $identifiant, $motdepasse ) 
<br>
  or die "Connexion impossible à la base de données $bd !";  <br>
  <br>
# Insertion des données  <br>
my $requete_sql_pointage = <<"SQL";  <br>
  INSERT INTO pointage (  matricule, sect, type-pointage, ordre, temps_passe, date_pointage, nom ) 
<br>
  VALUES ( $owner, 'S760044', '2', $args{Ordre Byo}, $worked, $day/$mon/$yr $hr:$min:$sec, $user ); 
<br>
SQL  <br>
  <br>
my $sth_pointage = $dbh->prepare($requete_sql_pointage) or die $dbh->errstr;  </font>
</p>
<p><font color="#800000">  $sth_pointage->execute( $owner, 'S760044', '2', $args{Ordre Byo}, $worked, $day/$mon/$yr $hr:$min:$sec, $user ) 
<br>
    or die "Echec Requête $requete_sql_pointage : $DBI::errstr";  <br>
  <br>
  <br>
# Déconnexion de la base de données  <br>
$dbh->disconnect();</font></p>
<p> </p>
<p>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.</p>
<p> </p>
<p> </p>
<p>Thank you for your help.</p>
<p> </p>
<p>Best regards,</p>
<p> </p>
<div style="font-family:Tahoma; font-size:13px">
<table border="0" cellpadding="1">
<tbody>
<tr>
<td style="font-family:'Arial'; color:#6c6f70; font-size:11px"><b>Julien CAUNAN</b></td>
</tr>
<tr>
<td style="font-family:'Arial'; color:#6c6f70; font-size:11px">Support Moyens De Tests</td>
</tr>
<tr>
<td style="font-family:'Arial'; color:#6c6f70; font-size:11px">Av. Paul Gellos, BP 531 - 64105 - BAYONNE Cedex - FRANCE</td>
</tr>
<tr>
<td style="font-family:'Arial'; color:#e00034; font-size:11px">julien.caunan@bmscircuits.com</td>
</tr>
<tr>
<td style="font-family:'Arial'; color:#6c6f70; font-size:11px">Tél   : +33 (0)5 59 58 41 51</td>
</tr>
<tr>
<td style="font-family:'Arial'; color:#6c6f70; font-size:11px">Mob : </td>
</tr>
<tr>
<td style="font-family:'Arial'; color:#6c6f70; font-size:11px">Fax : +33 (0)5 59 58 57 01</td>
</tr>
<tr>
<td style="font-family:'Arial'; color:#e00034; font-size:11px"><b>www.bmscircuits.com</b></td>
</tr>
<tr>
<td><img border="0" src="http://nsa22.casimages.com/img/2012/03/06//120306085532380989.jpg" width="150" height="55"></td>
</tr>
<tr>
<td style="font-family:'Arial'; color:#008400; font-size:11px"><img border="0" src="http://nsa21.casimages.com/img/2012/03/06//120306090312371802.jpg" width="62" height="57">Please consider your environmental responsibility before printing this e-mail</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
# " 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." #
</body>
</html>