[rt-users] absence planning
Eierschmalz, Bernhard
Bernhard.Eierschmalz at scheppach.com
Thu Jul 24 09:14:32 EDT 2014
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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20140724/febf0c08/attachment.htm>
More information about the rt-users
mailing list