[rt-users] Custom Condition - On Correspond or Comment

Thomas Sibley trs at bestpractical.com
Wed Mar 13 13:46:52 EDT 2013


On 03/13/2013 09:59 AM, Billington, James wrote:
> I was wondering if I can add an *or* in the first statement to make it
> apply to correspond or comment? Like this:
> 
> return 0 unless $self->TransactionObj->Type eq "Correspond" or “Comment”;

No, that's not valid Perl.  You'd need (line break is purely stylistic):

return 0 unless $self->TransactionObj->Type eq "Correspond"
             or $self->TransactionObj->Type eq "Comment";

> Essentially the entire helpdesk has grown tired of being admin CC’s on
> all queues but we want a way to be able to see correspondence or
> comments on unowned tickets. I’d prefer not to create two separate
> scrips. I didn’t want to create the scrips unless I was sure instead of
> just creating them to see if it would work.

I just pushed RT::Extension::NotifyBasedOnOwnership to CPAN and public
git.  It creates scrip conditions/actions you can use to do what you
want much more cleanly.  Look for
https://metacpan.org/release/RT-Extension-NotifyBasedOnOwnership to appear.



More information about the rt-users mailing list