Remove Re: or Fwd: from ticket title

Moderator: crythias

Locked
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Remove Re: or Fwd: from ticket title

Post by HervE »

Hello forum,

I'd like to have Re: or Fwd: prefixes automatically removed from ticket title at the creation.
How do you think I could manage easily?
Filters? Generic agent? other?

Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Remove Re: or Fwd: from ticket title

Post by crythias »

How often is a new ticket the result of a Reply or FWD? How can you mitigate that?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Remove Re: or Fwd: from ticket title

Post by HervE »

crythias wrote:How often is a new ticket the result of a Reply or FWD?
Whenever a customer sends his request to the wrong people, and these people forwards, or replies, to the support team. Let's say around 20% of the incoming new tickets.
crythias wrote:How can you mitigate that?
No way. I can not be responsible of what comes into our OTRS.

So, any idea of how to automatically modify, for instance, "Fwd: blah blah" into "blah blah" only?

Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Remove Re: or Fwd: from ticket title

Post by crythias »

There's not a good answer out of the box.

I'm thinking along the lines of postmaster filter. You could add X-OTRS-Title to the PostMaster list and see how that works.

match Subject re: (.*)
set X-OTRS-Title [***]

otherwise, procmail recipes, fetchmail filters (?) http://www.fetchmail.info/ , programmed PostMaster filter, manually change it in Free Fields, etc.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Remove Re: or Fwd: from ticket title

Post by HervE »

Hi crythias,

Thanks for your answer.

I tried to add X-OTRS-Title to the Postmaster list (in SysConfig), but it doesn't modifies the title at all.
See what I find in the log:
[Thu Aug 16 11:50:03 2012][Notice][Kernel::System::PostMaster::Filter::MatchDBSource::Run] Filter: 'test modif titre' Set param 'X-OTRS-Title' to 'titre modifié'

The filter applies, and I am sure param 'X-OTRS-Title' is set to the modified value.
Still the ticket title keeps the original value.

My guess is a mapping is missing somewhere between param 'X-OTRS-Title' and the real field title from ticket table in the database.
Your opinion?

Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Remove Re: or Fwd: from ticket title

Post by crythias »

eh. I really think PostMasterFilter is probably the wrong place. Try X-OTRS-Subject and if not that, you may want to consider modifying the code for the ticket numbering parser.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Remove Re: or Fwd: from ticket title

Post by HervE »

crythias wrote:Try X-OTRS-Subject
I tried to add X-OTRS-Subject in PostMaster list through SysConfig.
Then I have a postmaster filter on Subject='test_titre' => X-OTRS-Subject='titre_modifié'.
I know this filter is properly called because I can see it in the log:
[Thu Aug 16 16:14:03 2012][Notice][Kernel::System::PostMaster::Filter::MatchDBSource::Run] Filter: 'test modif titre' Set param 'X-OTRS-Subject' to 'titre modifié'
However, the ticket title remains equal to the subject of the incoming mail.

Isn't there a mapping or so?
In other words, where in the code is it 'written' that X-OTRS-TicketValue1 is linked to field freetext1 from table ticket (for instance)?
How does the system 'know'?

Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Remove Re: or Fwd: from ticket title

Post by HervE »

Has anyone got any idea?

Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
Locked