Gorazd,

Would you mind resending that patch as a unified diff?

Thanks!
Jesse


On Thu, Jul 15, 2010 at 02:12:23PM +0200, Gorazd Božič wrote:
> Hi all,
> 
> Today we tried using ScriptedAction for the first time since installing RTIR 
> 2.4.3. Investigations were created, but our logs were showing an error:
> 
> Jul 15 12:51:11 ostrv RT: <[email protected]> 
> #37311/268782 - Scrip 92 CreateInvestigation 
> (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:300) 
> Jul 15 12:51:11 ostrv RT: <[email protected]> 
> No recipients found. Not sending. 
> (/opt/rt3/bin/../lib/RT/Interface/Email.pm:342) 
> 
> After going through the code I found out that requestor is not set to the 
> correct e-mail address before ScriptedAction.html calls CreateTicket( %ARGS, 
> ... ). So you should stuff that address in the %ARGS hash (the third change 
> in the diff below). I took the opportunity to add a field where you can 
> specify the parent incident for all investigations being created (first two 
> changes in the diff). 
> 
> # diff -c /opt/src/RT-IR-2.4.3/html/RTIR/Tools/ScriptedAction.html 
> local/plugins/RT-IR/html/RTIR/Tools/ScriptedAction.html
> *** /opt/src/RT-IR-2.4.3/html/RTIR/Tools/ScriptedAction.html  2009-08-18 
> 17:26:46.000000000 +0200
> --- local/plugins/RT-IR/html/RTIR/Tools/ScriptedAction.html   2010-07-15 
> 13:38:14.000000000 +0200
> ***************
> *** 31,37 ****
>   <& /Elements/ListActions, actions => \...@finalresults &>
>   
>   <form method="get" action="ScriptedAction.html" name="ScriptedAction" 
> enctype="multipart/form-data">
> - <input type="hidden" name="incidentid" value="<%$incidentid%>" />
>   <input type="hidden" name="loop" value="<%$ARGS{'loop'}%>" />
>   <input type="hidden" name="UpdateType" value="response" />
>   <input type="hidden" name="Action" value="Respond" />
> --- 31,36 ----
> ***************
> *** 132,137 ****
> --- 131,144 ----
>       <input name="TemplateArg" size="60" value="<% $ARGS{'TemplateArg'} %>" 
> />
>     </td>
>   </tr>
> + <tr>
> +   <td class="label">
> +     <&|/l&>Link to incident</&>:
> +   </td>
> +   <td>
> +     <input type="text" name="incidentid" value="<%$incidentid%>" />
> +   </td>
> + </tr>
>     <tr>
>       <td align="right" colspan="2">
>       </td>
> ***************
> *** 313,318 ****
> --- 320,326 ----
>   
>           $ARGS{'Subject'} = $original_subject;
>           $ARGS{'Content'} = $original_content;
> +     $ARGS{'Requestors'} = $addr;
>   
>           for (qw/Subject Content/) {
>               $ARGS{$_} =~ s/_ADDR_/$addr/g;
> --- end of diff ---
> 
> I noticed this further down:
> 
>         my @watchresults = ProcessTicketWatchers(
>             TicketObj => $Ticket,
>             ARGSRef => { %ARGS, AddRequestor => $addr },
>         );
> 
> 
> This meant that we could see requestors in investigation tickets OK, but no 
> mail was being sent out! Confusing. 
> 
> Well - of course, since at the time the ticket was created, the requestor was 
> not specified yet (thus the corresponding Scrip error that no recipients are 
> listed). Later in the loop when the requestor was added this does not trigger 
> any scrips that deal with correspondence! IMO.
> 
> Regards,
> Gorazd
> 
> -- 
> Gorazd Bozic <[email protected]>
> ARNES SI-CERT, Tehnološki park 18, p.p. 7, SI-1001 Ljubljana, Slovenia
> tel: +386 1 479 88 22, fax: +386 1 479 88 23
> 
> _______________________________________________
> Rtir mailing list
> [email protected]
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rtir

-- 
_______________________________________________
Rtir mailing list
[email protected]
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rtir

Reply via email to