Hello everybody,

Scrip question:

I'm trying to create a "CustomAction" to have communication between
owner and admincc through the commentaries of tickets. It interests to me
to do that any commentary that does one of both receives the other.


# Create new scrip
Configuration -> Global -> Scrips -> New Script

Description: On Comment Notify AdminCCs or Owner with template Admin Comment

Condition: On Comment
Action: User Defined
Template: Admin Comment (custom template )
Stage: TransactionCreate


User Defined conditions and actions
-----------------------------------
Custom condition:

# load id_actor
my $id_actor = $TransactionObj->CreatorObj->Id;

# is owner, send comment to AdminCC
if( $id_actor == $self->TicketObj->OwnerObj->Id ) {
    return 1;

# is AdminCC, send comment to Owner
} elsif ($TicketObj->IsWatcher( Type => 'AdminCC' ) ) {
    return 1;

# is ????, nothing to do
} else {
    return undef;
}


Custom action preparation code:
# empty??

Custom action cleanup code:
# empty??


Custom Field and Scrip Question:
How to detect the new value of custom field, if this changed.


Thanks,
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to