[rt-users] How do I override a default scrip?

Paul Tomblin ptomblin at xcski.com
Sat May 19 00:15:50 EDT 2012


On Fri, May 18, 2012 at 11:51 PM, Bill Cole
<rtusers-20090205 at billmail.scconsult.com> wrote:
> On 18 May 2012, at 17:40, Paul Tomblin wrote:
>
>> On Fri, May 18, 2012 at 3:47 PM, Bill Cole
>> <rtusers-20090205 at billmail.scconsult.com> wrote:
>>>
>>> Another option is to modify the Global Scrip with a User Defined
>>> Condition
>>> that returns 0 if the Queue is one that you want to exempt.
>>
>>
>> How do I programmatically add one of these User Defined Conditions to
>> an existing RT Global Scrip?  (Preferably something that I can do in
>> my etc/initialdata)
>
>
> Ewww. Why???

Because I want to provide an extension that my client can install on
their RT installation, and when they type "make initdb" in the source
directory for my extension it adds all the things that are particular
to that extension to the RT system.  Just like the way literally
dozens of other extensions that I've looked at do it.


>
> With a running RT (i.e. a system where etc/initialdata has seen its single
> lifetime access) just go into the Scrip's definition
> (Configuration->Global->Scrips->$WhicheverOneYouAreChanging) and switch the
> "Condition" from whatever it is (e.g. "On Comment") to "User Defined" and
> put some suitable perl in the "Custom condition" text area. See

I don't want to have to log into their RT systems and configure them
for them.  I want them to be able to install it on as many or as few
RT systems as they want just by typing "make; make initdb; make
install" just like every other RT extension.


> With that caveat, I think it's not true that the way Scrips relate to Queues
> is inconsistent with Templates. Templates also are either Queue-specific or
> Global and point to their Queue by ID, rather than the Queue pointing to
> them by name. This is pretty much orthodox data structuring.

That is simply not true.  If I want to override the system provided
"Resolved" template for a particular queue, then all I have to do is
make a new template called "Resolved" on that queue.  It's referenced
by name, and only my new Resolved template will be used for that
queue.  If I want to override the behavior of the default "On Resolve
Notify Requestors" for a particular queue I can't just create a new
Scrip with the same name, because then it will run both Scrips.  There
is no definition of the word "consistent" which that fits the
definition of.


-- 
http://www.linkedin.com/in/paultomblin
http://careers.stackoverflow.com/ptomblin



More information about the rt-users mailing list