Automatically set ticket to stalled

has anyone written a scrip or script that will automatically set a
ticket to stalled after a certain period of inactivity?

Mathew Snyder

I’ll be implementing something very similar soon and my line of thinking
was an hourly script with:
$RT::Handle->SimpleQuery(“update Tickets set status = ‘stalled’ where
status =‘open’ and LastUpdated < (now() - interval 12 hour)”);
??
Roy

Mathew Snyder wrote:

Alternately, you could write a new Action to change the status. At present
there is RT::Action::SetPriority and it should be reasonably easy to create
a SetStatus based upon this Action. The TicketObj->SetStatus method already
exists.
RT::Action::SetPriority is in $RTROOT$/lib/RT/Action/SetPriority.pm

Then you could set a cron job to run, using the rt-crontool with an argument
like:

bin/rt-crontool
–search RT::Search::ActiveTicketInQueue --search-arg general
–condition RT::Condition::UntouchedInHours --condition-arg 48
–action RT::Action::SetStatus --action-arg stalled

I may be wrong, I’m fairly new to RT, but I should think that something
along those lines would be more modular.On 8/7/06, Roy El-Hames rfh@pipex.net wrote:

I’ll be implementing something very similar soon and my line of thinking
was an hourly script with:
$RT::Handle->SimpleQuery(“update Tickets set status = ‘stalled’ where
status =‘open’ and LastUpdated < (now() - interval 12 hour)”);
??
Roy

Mathew Snyder wrote:

has anyone written a scrip or script that will automatically set a
ticket to stalled after a certain period of inactivity?

Mathew Snyder


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Regards,

Andrew Nicols

I appreciate your response. I’ve been trying to find a way to
indoctrinate myself in the code of RT but could not find a place to
start. Your information might allow me to start tooling around with it
without actually giving me the answer. Thanks

Mathew Snyder

Andrew Nicols wrote:

I appreciate your response. I’ve been trying to find a way to
indoctrinate myself in the code of RT but could not find a place to
start. Your information might allow me to start tooling around with it
without actually giving me the answer. Thanks

I just tried it (for fun of course;)) and just replaced every occurence of
SetPriority with SetStatus in the file and it worked out of the box :slight_smile:

The UntouchedInHours condition isn’t a standard condition so you might want
to have a look at Request Tracker Wiki

I’d say that’s the easiest way of getting it to work, and then just use the
crontool with the syntax I suggested below.

As I say, I’m new to RT too so I may be barking up the wrong tree. You may
also find the guide at
Request Tracker Wiki particularly
helpful,