[rt-users] Trouble with notification scrip

Kenneth Crocker KFCrocker at lbl.gov
Fri May 18 13:33:04 EDT 2007


Stephan,


	I have another question; why all the references to QueueObj? On page 
129 of the RT Essentials book (in reference to Transactions, I am 
assuming transactions generated by changing a field, etc.) it says "For 
updates that alter a field or custom field, field tracks what was 
changed". That sounds to me like all I should need to refer to is the 
name of the field, not what Queue it is in. I can't find an easy 
reference to this kind of relationship. I find that the RT Essentials 
book could do a MUCH better job of making some of this stuff easier to 
understand, like more specific examples and models of various code (like 
how to trigger a notification from a CF being changed or how to do that 
plus modify another field (custom or otherwise)). It would seem to me 
that for beginners like myself, simple little things like that would 
make a world of difference in our ability to get some simple 
modifications going.
	Jesse, how about it? Is a new and updated release due out soon?

Kenn
LBNL

Stephen Turner wrote:
> Kenn,
> 
> The following code might do what you need - it's taken from a similar 
> scrip we use.
> 
> Steve
> 
> 
> 
> my $trans = $self->TransactionObj;
> 
> if ($trans->Type eq 'CustomField') {
>     my $cf = new RT::CustomField($RT::SystemUser);
>     $cf->LoadByName(Queue => $self->TicketObj->QueueObj->id,
>                     Name => "Approval-Status");
>     return 0 unless $cf->id;
>     if ($trans->Field == $cf->id && $trans->NewValue
>         && $trans->NewValue eq "Reviewing Request" ) {
>         return 1;
>     }
> }
> 
> return 0;
> 
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy 
> a copy at http://rtbook.bestpractical.com
> 



More information about the rt-users mailing list