<p>Many thanks for tour help !</p>
<div class="gmail_quote">Le 21 janv. 2014 20:38, "Kevin Falcone" <<a href="mailto:falcone@bestpractical.com">falcone@bestpractical.com</a>> a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thu, Jan 16, 2014 at 06:46:06PM +0100, Eric Maisonobe wrote:<br>
>    Hello,<br>
>    I try to use the following cron task :<br>
>    /opt/rt4/bin/rt-crontool \<br>
><br>
>      --search RT::Search::FromSQL \<br>
>      --search-arg "Created < '1 day ago' AND (Status = 'new') " \<br>
>      --action RT::Action::NotifyAsComment \<br>
>      --action-arg 'OtherRecipients'<br>
>      --template 'my_nice_template'<br>
><br>
>    but nothing is done (no comment and no notification), because RT complains :<br>
><br>
>      [critical]: Can't call method "CreatorObj" on an undefined value at<br>
>      /opt/rt4/bin/../lib/RT/Action/Notify.pm line 134. (/opt/rt4/bin/../lib/RT.pm:400)<br>
><br>
>    I look at "/opt/rt4/bin/../lib/RT/Action/Notify.pm line 134" and i see :<br>
><br>
>      my $creatorObj = $self->TransactionObj->CreatorObj;<br>
><br>
>    So, does anybody knows :<br>
>    -> how to use rt-crontool with "--action RT::Action::NotifyAsComment",<br>
>    -> or how to specify the default RT system user in the Notify.pm script<br>
>    something like :<br>
><br>
>      eval( my $creatorObj = $self->TransactionObj->CreatorObj) || my $creatorObj =<br>
>      <RT_DEFAULT_USER_OBJ>;<br>
<br>
You want the --transaction argument if you're going to use a Notify<br>
action:<br>
<a href="http://bestpractical.com/docs/rt/latest/rt-crontool.html" target="_blank">http://bestpractical.com/docs/rt/latest/rt-crontool.html</a><br>
You want first or last, not all.<br>
<br>
You may find the notification example of the reminders documentation<br>
interesting<br>
<a href="http://bestpractical.com/docs/rt/latest/reminders.html#Email-Reminders" target="_blank">http://bestpractical.com/docs/rt/latest/reminders.html#Email-Reminders</a><br>
<br>
-kevin<br>
</blockquote></div>