Change RTname smoothly

Hi,

I need to change my rtname, but has the server is in production, I’ve got to
be pretty sure nothing is going to go wrong.

I found some info about some extra lines to add to the EmailParser.pm:

*** ./lib/RT/EmailParser.pm~ 2004-06-15 02:08:15.000000000 +0200
— ./lib/RT/EmailParser.pm 2004-08-23 18:58:47.000000000 +0200
*** 332,337 ****
— 332,342 ----
$RT::Logger->debug(“Found a ticket ID. It’s $id”);
return ($id);
}

  • elsif ($Subject =~ s/[OldName #(\d+)]//i) {
  • my $id = $1;
  • $RT::Logger->debug(“Found an old (OldName) ticket ID. It’s $id”);
  • return ($id);
  • }
    else {
    return (undef);
    }

But I have to be pretty sure this will work. and about changing Rtname
itself, should I alter it in RT_SiteConfig.pm, and make initialize-database
or doing this will initialize all the info instead of only the rtname?

How should I do it? Any advice from someone who has done it.?

smime.p7s (3.02 KB)

In recent RT, you want to look at the RT subject regex option in the
config file.On Jun 6, 2007, at 6:53 AM, Carlos R. S. wrote:

Hi,

I need to change my rtname, but has the server is in production,
I’ve got to be pretty sure nothing is going to go wrong.

I found some info about some extra lines to add to the EmailParser.pm:

*** ./lib/RT/EmailParser.pm~ 2004-06-15 02:08:15.000000000 +0200
— ./lib/RT/EmailParser.pm 2004-08-23 18:58:47.000000000 +0200


*** 332,337 ****
— 332,342 ----
$RT::Logger->debug(“Found a ticket ID. It’s $id”);
return ($id);
}

  • elsif ($Subject =~ s/[OldName #(\d+)]//i) {
  • my $id = $1;
  • $RT::Logger->debug(“Found an old (OldName) ticket ID. It’s $id”);
  • return ($id);
  • }
    else {
    return (undef);
    }

But I have to be pretty sure this will work… and about changing
Rtname itself, should I alter it in RT_SiteConfig.pm, and make
initialize-database or doing this will initialize all the info
instead of only the rtname?

How should I do it? Any advice from someone who has done it…?


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

PGP.sig (186 Bytes)

The code below will work, yes. As for changing RT name, yes, you have to
change $rtname in RT_SiteConfig.pm. You don’t need to make any changes to
the database.

However, rather than changing the code in EmailParser.pm, you can
accomplish the same thing by adding the following into RT_SiteConfig.pm:

Set($EmailSubjectTagRegex, qr/(?:|)/i );

James Moseley

         "Carlos R. S."                                                
         <cbsilva@student.                                             
         dei.uc.pt>                                                 To 
         Sent by:                  <rt-users@lists.bestpractical.com>  
         rt-users-bounces@                                          cc 
         lists.bestpractic                                             
         al.com                                                Subject 
                                   [rt-users] Change RTname            
                                   smoothly...                         
         06/06/2007 05:53                                              
         AM                                                            

Hi,

I need to change my rtname, but has the server is in production, I’ve got
to be pretty sure nothing is going to go wrong.
I found some info about some extra lines to add to the EmailParser.pm:

*** ./lib/RT/EmailParser.pm~ 2004-06-15 02:08:15.000000000 +0200
— ./lib/RT/EmailParser.pm 2004-08-23 18:58:47.000000000 +0200
*** 332,337 ****
— 332,342 ----
$RT::Logger->debug(“Found a ticket ID. It’s $id”);
return ($id);
}

  • elsif ($Subject =~ s/[OldName #(\d+)]//i) {
  • my $id = $1;
  • $RT::Logger->debug(“Found an old (OldName) ticket ID. It’s $id”);
  • return ($id);
  • }
    else {
    return (undef);
    }

But I have to be pretty sure this will work… and about changing Rtname
itself, should I alter it in RT_SiteConfig.pm, and make initialize-database
or doing this will initialize all the info instead of only the rtname?

How should I do it? Any advice from someone who has done it…?

(See attached file: smime.p7s)
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

smime.p7s (3.02 KB)

Which config file? RT_SiteConfig.pm??

BTW, my RT is version 3.6.3De: Jesse Vincent [mailto:jesse@bestpractical.com]
Enviada: quarta-feira, 6 de Junho de 2007 16:23
Para: Carlos R. S.
Cc: rt-users@lists.bestpractical.com
Assunto: Re: [rt-users] Change RTname smoothly…

In recent RT, you want to look at the RT subject regex option in the config
file.

smime.p7s (3.02 KB)

Thanks!

It’s working! :wink:

Regards,

CSDe: Jesse Vincent [mailto:jesse@bestpractical.com]
Enviada: quarta-feira, 6 de Junho de 2007 16:23
Para: Carlos R. S.
Cc: rt-users@lists.bestpractical.com
Assunto: Re: [rt-users] Change RTname smoothly…

In recent RT, you want to look at the RT subject regex option in the config
file.

smime.p7s (3.02 KB)

http://wiki.bestpractical.com/view/RenameInstanceOn 6/6/07, Carlos R. S. cbsilva@student.dei.uc.pt wrote:

Thanks!

It’s working! :wink:

Regards,

CS

De: Jesse Vincent [mailto:jesse@bestpractical.com]
Enviada: quarta-feira, 6 de Junho de 2007 16:23
Para: Carlos R. S.
Cc: rt-users@lists.bestpractical.com
Assunto: Re: [rt-users] Change RTname smoothly…

In recent RT, you want to look at the RT subject regex option in the config
file.

On Jun 6, 2007, at 6:53 AM, Carlos R. S. wrote:

Hi,

I need to change my rtname, but has the server is in production, I’ve got to
be pretty sure nothing is going to go wrong.

I found some info about some extra lines to add to the EmailParser.pm:

*** ./lib/RT/EmailParser.pm~ 2004-06-15 02:08:15.000000000 +0200
— ./lib/RT/EmailParser.pm 2004-08-23 18:58:47.000000000 +0200


*** 332,337 ****
— 332,342 ----
$RT::Logger->debug(“Found a ticket ID. It’s $id”);
return ($id);
}

  • elsif ($Subject =~ s/[OldName #(\d+)]//i) {
  • my $id = $1;
  • $RT::Logger->debug(“Found an old (OldName) ticket ID. It’s $id”);
  • return ($id);
  • }
    else {
    return (undef);
    }

But I have to be pretty sure this will work… and about changing Rtname
itself, should I alter it in RT_SiteConfig.pm, and make initialize-database
or doing this will initialize all the info instead of only the rtname?

How should I do it? Any advice from someone who has done it…?


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com

Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.

Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.