<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Thanks for the hint... I was able to do what I needed. <br>
I post here the contents of the local/lib/RT/Action/DelayDue.pm
script, for others that may need it:<br>
<br>
----<br>
package RT::Action::DelayDue;<br>
use base 'RT::Action';<br>
<br>
use strict;<br>
<br>
#Do what we need to do and send it out.<br>
<br>
#What does this type of Action does<br>
<br>
# {{{ sub Describe <br>
sub Describe {<br>
my $self = shift;<br>
return (ref $self . " will increase the ticket Due Date to the
argument provided in minutes.");<br>
}<br>
# }}}<br>
<br>
<br>
# {{{ sub Prepare <br>
sub Prepare {<br>
# nothing to prepare<br>
return 1;<br>
}<br>
# }}}<br>
<br>
sub Commit {<br>
my $self = shift;<br>
my $due = $self->TicketObj->DueObj();<br>
if ($due->Unix() > 1) {<br>
$due->AddSeconds( $self->Argument * 60 );<br>
$self->TicketObj->SetDue($due->ISO);<br>
}<br>
}<br>
<br>
RT::Base->_ImportOverlays();<br>
<br>
1;<br>
----<br>
<br>
<br>
And a nice crontool that runs every hour:<br>
<br>
/opt/rt3/bin/rt-crontool --search RT::Search::FromSQL --search-arg
"Queue = 'z1-rt' AND Status = 'stalled'" --action
RT::Action::DelayDue --action-arg 60 --verbose<br>
<br>
<br>
Hope it helps! Thanks again for the help!<br>
BR/Pablo<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 03/04/2014 08:40 PM, Kevin Falcone
wrote:<br>
</div>
<blockquote cite="mid:20140304194059.GB3076@jibsheet.com"
type="cite">
<pre wrap="">On Mon, Mar 03, 2014 at 09:55:08PM +0000, Fernandez Pablo wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">On Mar 3, 2014 8:40 PM, Kevin Falcone <a class="moz-txt-link-rfc2396E" href="mailto:falcone@bestpractical.com"><falcone@bestpractical.com></a> wrote:
On Fri, Feb 28, 2014 at 11:58:27AM +0100, Pablo Fernandez wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I was wondering... is there a way I can delay (a fixed amount of time)
the Due Date on all tickets that match some criteria (like being in
stalled state)?
I was thinking of using rt-crontool for that task as a sort of way to
"park" tickets (a cron job that runs every hour and delays 1 hour all
stalled tickets).
</pre>
</blockquote>
<pre wrap="">
Sounds like you want rt-crontool?
<a class="moz-txt-link-freetext" href="http://bestpractical.com/docs/rt/latest/rt-crontool.html">http://bestpractical.com/docs/rt/latest/rt-crontool.html</a>
<a class="moz-txt-link-freetext" href="http://bestpractical.com/docs/rt/latest/automating_rt.html">http://bestpractical.com/docs/rt/latest/automating_rt.html</a>
</pre>
</blockquote>
<pre wrap="">But among the actions, I did not find any to change the due date (and neither in the two links )
Any hints on how to do that?
</pre>
</blockquote>
<pre wrap="">
You'll have to provide your own action in
local/lib/RT/Action/CustomDueMunging.pm
Likely you want a Prepare of { return 1}; and then you'll have your
real logic in Commit.
-kevin
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>