<p dir="ltr">TransactionBatch scrips always run after TransactionCreate scrips.</p>
<p dir="ltr">If it's running three times, it's quite possibly still applied to a queue (or globally) in Create mode.</p>
<p dir="ltr">I test whether a scrip is running in batch mode using:</p>
<p dir="ltr">if (my @txns = @{ $self->TicketObj->TransactionBatch }) {<br>
# batch mode; iterate over @txns<br>
...<br>
}<br>
else {<br>
# create mode<br>
...<br>
}</p>
<div class="gmail_quote">On 17/09/2014 3:09 am, "andriusk" <<a href="mailto:andrius.kulbis@gmail.com">andrius.kulbis@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How should I make my TransactionBatch scrip run after all changes inducing<br>
scrip? Is it enought if it is the only scrip in batch mode? Because now I<br>
get this batch scrip run after every different type transaction (3 changes -<br>
status, subject, customfield - 3 times ran scrip in batch mode. Also I dont<br>
think that checking TicketObj->RanTransactionBatch is correct to determine<br>
if the scrip done its job in scrip with batch mode?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://requesttracker.8502.n7.nabble.com/Catch-all-ticket-changes-in-one-scrip-tp58372p58557.html" target="_blank">http://requesttracker.8502.n7.nabble.com/Catch-all-ticket-changes-in-one-scrip-tp58372p58557.html</a><br>
Sent from the Request Tracker - User mailing list archive at Nabble.com.<br>
--<br>
RT Training - Boston, September 9-10<br>
<a href="http://bestpractical.com/training" target="_blank">http://bestpractical.com/training</a><br>
</blockquote></div>