[rt-users] changing $rtname

Larry Stone lcs at MIT.EDU
Tue Aug 19 02:59:49 EDT 2003


> > >>there have been warnings about changing $rtname.  over the past months
> > >>there have also been questions about how to fix issues after one changes
> > >>$rtname yet not a single answer that i could find.  any new list users
> > >>that have tacked this issue as i am about to and would love some support?
> > >>
> > this was easy to accomplish.  after studying the database i only had to
> > modify the Transaction Table to replace the old string with my new one.
> > then changing $rtname in the config file and everything works fine.
> >
> But now if anyone replies to an old ticket with the old rtname, a new
> ticket will be opened.

I worked around this when migrating from a pilot-project system where
I'd made a dumb choice of $rtname and wanted to change it.  Here's
the diff (I substituted OldDumbRTname to make it obvious).   When
users reply to old mail with the OldDumbRTname in Subject: it
gets parsed correctly.

    -- Larry

*** ../libraries/lib/RT/EmailParser.pm  Thu Jul  3 19:55:38 2003
--- lib/RT/EmailParser.pm       Thu Jul  3 21:44:09 2003
***************
*** 256,263 ****
  
      my $Subject = shift;
  
!     if ( $Subject =~ s/\[\Q$RT::rtname\E\s+\#(\d+)\s*\]//i ) {
!         my $id = $1;
          $RT::Logger->debug("Found a ticket ID. It's $id");
          return ($id);
      }
--- 256,263 ----
  
      my $Subject = shift;
  
!     if ( $Subject =~ s/\[(OldDumbRTname|\Q$RT::rtname\E)\s+\#(\d+)\s*\]//i ) {
!         my $id = $2;
          $RT::Logger->debug("Found a ticket ID. It's $id");
          return ($id);
      }




More information about the rt-users mailing list