<p>One of our queues receives job requests via e-mail.  I have a scrip in place that automatically assigns the newly-created ticket to any of several users, if the subject is in a certain, easily-parsed format.  This works fine.</p>

<p>For this scrip, the condition is "On Create", the action is "User Defined", the template is "Blank", and the stage is "TransactionCreate".  You can view it at <a href="http://www.nopaste.nl/?paste=2004" target="_top" rel="nofollow">http://www.nopaste.nl/?paste=2004</a>.</p>

<p>Like I said, it works fine, but downstream scrips do NOT seem to see the update.  I modified the WatchCreate template to include a line that says "This ticket has been assigned to [so-and-so]".  This does not work.  It sees the original owner, not the owner that was set by the earlier scrip.  Yet, after the ticket is created, I can go into the RT web interface and see that the owner was set properly.  My WatchCreate template is as follows:</p>
<pre>Subject: New ticket {$Ticket->id}: {$Ticket->Subject}


Greetings,
{my ($id, $subj, $own) = ($Ticket->id, $Ticket->Subject, $Ticket->Owner);
$RT::Logger->debug(qq#EJR-WatchCreate (queue): ID=$id, owner=$own, subj=$subj#);
"$id -- $own";}
This message has been automatically generated in response to the
creation of support ticket number {$Ticket->id}, regarding:
        "{$Ticket->Subject()}", 
a summary of which appears below.
{my $owner = $Ticket->Owner;
($owner && $owner ne 'Nobody' && $owner != $RT::Nobody->Id)?
    "\nThis ticket has been assigned to $owner."
  : "\nThis ticket has not been assigned to anyone."
}

Please don't reply to this message.  This ticket has been
assigned an ID of [{$Ticket->QueueObj->SubjectTag || $rtname} #{$Ticket->id()}].

-------------------------------------------------------------------------
{$Transaction->Content()}</pre>

<p>When I look in the RT debug log, I can see that the assign-owner scrip runs first, and is successful, and the notify-watchers scrip runs later—but the log-debug in the notify-watchers scrip does not write anything to the log.  However, the "$id -- $own" line <em>does</em> get inserted into the e-mail, so I know my code is being executed.  Anyhow, the user id that this code block inserts into the watcher e-mail is the original owner (id 6, Nobody), not the owner that was set by the earlier scrip.</p>

<p>What step am I missing here?</p>
<br><hr align="left" width="300">
View this message in context: <a href="http://old.nabble.com/Scrip-modifies-ticket%2C-but-downstream-scrips-don%27t-see-the-updates-tp30599938p30599938.html">Scrip modifies ticket, but downstream scrips don't see the updates</a><br>
Sent from the <a href="http://old.nabble.com/Request-Tracker---User-f572.html">Request Tracker - User mailing list archive</a> at Nabble.com.<br>