I'm trying to get a scrip condition to match when the Starts field of a
ticket has a date of today.  We want to be able to set tickets as
stalled with a Starts date sometime in the future, and have a cron job
open tickets on the day when they start, and have a scrip notify the
ticket owner.

Cron entry looks like this:
rt-crontool --search RT::Search::FromSQL --search-arg "Status =
'stalled' AND Starts = 'today'" --action RT::Action::SetStatus
--action-arg "open"

Scrip condition looks like this:
my $txn = $self->TransactionObj;
my $starts = $self->TicketObj->StartsObj;
if ( $txn->OldValue eq "stalled" && $txn->NewValue eq "open" && $starts
eq "today" )
{
 return 1;
}
else
{
 return 0;
}

The date isn't matching though.  I'm missing something, I'm just not
sure what (date conversion maybe?)
_______________________________________________
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