Re: Match isWatcher and part of subjectline
Joel Bergmark <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.request-tracker.user |
|---|---|
| Message-ID | <DB5PR07MB1031B670C4A7BC2DDF92CB25A0C70@DB5PR07MB1031.eurprd07.prod.outlook.com> |
Could anyone assist with this scrip?
This matches $match2 at every time, regardless if both $match1 and $match2 is present in the subject-line. Hence the If(index part is not working, any good perl-people that can correct it? Both matches must be present to not return 0;
my $match1 = "InformationX";
my $match2 = "[Y]";
my $subject = $self->TicketObj->Subject;
if (index(lc($subject), ($match1 && $match2)) eq -1)
{
return 0;
}
else {
return 1 if $self->TicketObj->IsWatcher(
Type => 'Requestor', Email => '[email protected]'
);
return 0;
}
Regards,
Från: rt-users [mailto:[email protected]] För Joel Bergmark
Skickat: den 5 oktober 2016 15:25
Till: [email protected]
Ämne: [rt-users] Match isWatcher and part of subjectline
Anyone has some cool code to match something like this: If iswatcher is <my match> then check if subject contains <my match2> return 1; else return 0;
I cant get this simple stuff to work, perl isn't my thing :-)
Regards
---------
RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017