Thanks Jim, I think that has got me off and running now. About order of execution, from what I read it is alphabetical, does that group queue specific scripts in with the globals and then order them?
Cheers Miles Scruggs [email protected] On Apr 23, 2013, at 10:01 AM, Jim Berry <[email protected]> wrote: > This should do what you want . It could be generalized to use groups or > AdminCc. Create a scrip with > > Condition = On Create > Action = User Defined > Template = Blank > Stage = TransactionCreate > > In the Custom action preparation code box, insert: > > ## Add other user as a Cc if ticket is created by either in the users list > > my @users = ('[email protected]', '[email protected]'); > my $creator = $self->TransactionObj->CreatorObj->EmailAddress; > my $Ticket = $self->TicketObj; > > if ($creator eq $users[0]) { > $Ticket->AddWatcher(Type => 'Cc', Email => $users[1]); > } > elsif ($creator eq $users[1]) { > $Ticket->AddWatcher(Type => 'Cc', Email => $users[0]); > } > > In the Custom action cleanup code box, insert: > 1; > > > -- Jim > > > From: [email protected] > [mailto:[email protected]] On Behalf Of Miles Scruggs > Sent: Monday, April 22, 2013 3:52 PM > To: RT users > Subject: Re: [rt-users] Custom condition for script > > anyone able to help on this one? > > > On Tue, Apr 16, 2013 at 10:46 AM, Miles Scruggs <[email protected]> > wrote: > I have a couple users that can't be trained to CC each other, and they need > to be CC'd on everything they create, but they also aren't the only ones > creating to the queue so I can't just set them as a watcher for the queue. > > Basically I would like to check on create to see if they are one or the other > user, and if they are then I would like to add their counterpart as a CC to > the ticket. Basically some code that looks like this: > > if(user=bob | bill) { > AddUserAsCCToTicket(bob&bill) > } > > The bad news here is that I'm incredibly dumb when it comes to perl, and have > no grasp at all of the syntax much less the methods to use. > > I'm guessing I put stuff like this in scrips, but I'm not 100% and I'm not > sure if that can be put entirely in the condition or if I need to put it in > both the condition and the action... > > Cheers > > Miles Scruggs > [email protected] > > > > > > -- > Cheers, > > Miles
smime.p7s
Description: S/MIME cryptographic signature
