Moving TicketID to end of Subject Line

Moderator: crythias

Locked
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Moving TicketID to end of Subject Line

Post by Mothra »

A requirement from some of our external customers is that the TicketID be at the end of the subject line instead of the beginning. I've almost got this working by modifying $OTRS_HOME/Kernel/System/Ticket.pm and changing it thus:

Code: Select all

 # return subject for new tickets
    if ( $Param{Type} && $Param{Type} eq 'New' ) {
        return $Subject . " [$TicketHook$TicketHookDivider$Param{TicketNumber}]";
    }

    # return subject for existing tickets
    if ($TicketSubjectRe) {
        $TicketSubjectRe .= ': ';
    }
    return $TicketSubjectRe . $Subject . " [$TicketHook$TicketHookDivider$Param{TicketNumber}] ";
However, the second part doesn't working properly, and I'm not sure why. When I reply to a ticket, the subjectline in the Agent screen shows as:
Re: First test ticket (Demo System no. 2) [EP: 100001]
but when the email arrives at the destination email account, the subject line reads:
Re: First test ticket (Demo System no. 2) [EP: 100001] [EP: 100001]
Can anyone explain why this is (aside from the fact that I'm monkeying around with the OTRS code!)?

EDIT: I'm guessing that somewhere else, there's some routine to add the ticket number if it's not already present at the beginning of the subject line, but I can't find it.
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
elvanov
Znuny newbie
Posts: 32
Joined: 12 Jun 2010, 00:42
Znuny Version: 2.4.7

Re: Moving TicketID to end of Subject Line

Post by elvanov »

Hello,

You don't need to modify the code directly. Just go to the SysConfig and set Ticket::SubjectFormat to "Right".

I hope this helps!

Regards,
Elva
Mothra
Znuny expert
Posts: 189
Joined: 26 Oct 2010, 15:04
Znuny Version: 3.2.11

Re: Moving TicketID to end of Subject Line

Post by Mothra »

elvanov wrote:Hello,

You don't need to modify the code directly. Just go to the SysConfig and set Ticket::SubjectFormat to "Right".

I hope this helps!

Regards,
Elva
This is a new feature in OTRS 3.0 though, isn't it? When I posted the above, I was still on 2.4
OTRS 3.2.11 on Centos 6.4 with MySQL 5.0. Agents and internal customers authenticate via Active Directory.
elvanov
Znuny newbie
Posts: 32
Joined: 12 Jun 2010, 00:42
Znuny Version: 2.4.7

Re: Moving TicketID to end of Subject Line

Post by elvanov »

You are totally right, this is something new in 3.0.

I forgot to ask which version were you using.

Regards,
Elva
Locked