Hello,

I want to build some absence planning into our RT to avoid that absent users 
receive messages and nobody sees this message. What I'm planning is the 
following:


1.      Creating a user's custom field "absent" which is yes or no

2.      When a user is absence, this user changes this field to yes, when he's 
back he changes back to no

3.      When the status of one ticket with absent owner (where custom field 
value is "yes") changes, the owner show be set to nobody (so the other 
colleagues can find the ticket


so I planned to set up this with a Scrip.
Scrip Action is easy. It's
$self->TicketObj->SetOwner ( $RT::Nobody->id );
Return 1;



What I'm having problems with is Scrip Condition.

For the first step, I tried to run the scrip on any update, so I only have to 
check whether the absent-CF is yes or no
I tried the following line:
return 1 if $self->TicketObj->Owner->Customfields->CustomFieldValue('absent') 
eq "yes";

but this isn't working. What is wrong?


A second step will be to check, what exactly was changed (and only run if 
status was changed).
I think I can do this with
return 0 unless $self->TransactionObj->Type eq "Status"

in front of the other code; am I right?



Best regards,

Bernhard,
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training

Reply via email to