RegEx and PostMaster filters

Moderator: crythias

Locked
JensMilanese
Znuny newbie
Posts: 1
Joined: 23 Apr 2014, 14:39
Znuny Version: 3.1.12
Real Name: Jens Milanese
Company: MAC IT-Solutions GmbH

RegEx and PostMaster filters

Post by JensMilanese »

Hello!

We have the following problem:

We are connecting several external systems to our OTRS installation and we are using PostMaster filters for converting state, type, priority etc. Everything works fine - so good.

To reduce our filter rules we tried to use RegEx on the the filter rules instead of creating one single rule for e.g. each ticket state. But it don't work!

Example:

In the beginning of the body there ist the line: "Status: 17 (re-work to be done)"; matching our status "17 (re-work to be done)", that means every ticket state after "Status: " will be delivered exactly as our internal OTRS ticket state.

Using a single line ("body" :: "Status: 17 (re-work to be done)") everything works.

Using a RegEx like ("body" :: "Status: (*) ) and setting X-OTRS-STATUS with [***] it doesn't work.

What are we doing wrong; the OTRS documentation is not a powerful help :-((((

Thanx

Jens
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: RegEx and PostMaster filters

Post by reneeb »

You should use ".*":

Code: Select all

Status: (.*)
note the "." before the asterisk...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Locked