<div>Hello everyone,</div>
<div> </div>
<div>I am trying to add the date to the subject line that rt generates. for example [rtname #260208-101] <br clear="all">I adjusted as follows:</div>
<div> </div>
<div>sub SetSubjectToken {<br> my $self = shift;<br> my $sub = $self->TemplateObj->MIMEObj->head->get('Subject');<br> my $id = $self->TicketObj->id;</div>
<div> </div>
<div> my $token_re = $RT::EmailSubjectTagRegex;<br> $token_re = qr/\Q$RT::rtname\E/o unless $token_re;<br> return if $sub =~ /\[$token_re\s+# strftime('%d%m%y', @{[localtime()]}) -$id\]/;</div>
<div> </div>
<div> $sub =~ s/(\r\n|\n|\s)/ /gi;<br> chomp $sub;<br> $self->TemplateObj->MIMEObj->head->replace(<br> Subject => "[$RT::rtname #" . strftime('%d%m%y', @{[localtime()]}) . "-$id] $sub",<br>
);</div>
<div> </div>
<div>Works perfectly when creating a ticket, but whenever replying to the ticket a new ticket is created. </div>
<div>I believe it has to do with return if $sub =~ /\[$token_re\s+# strftime('%d%m%y', @{[localtime()]}) -$id\]/;</div>
<div> </div>
<div>I hardly know perl and was available to google appending strings in perl. But the above I do not know how to figure out.</div>
<div> </div>
<div>Any help would be appreciated. <br>}</div>
<div> </div>
<div><br>-- <br>- - Sharlon ©. </div>