Ticket Escalation without Updated field being updated

Hi,

I’m running a nigthly cron which looks like this:

rt-crontool --search RT::Search::ActiveTicketsInQueue --search-arg
Inquiries --condition RT::Condition::UntouchedInHours --condition-arg 24
–action RT::Action::EscalatePriority --verbose

The purpose of this is to escalate tickets which haven’t been worked on
for 24 hours or more. I also do different actions on it after being
untouched for several days, etc. This however would require that the
ticket doesn’t get updated when escalated. Is this doable?

TIA

Mattias Nordstrom
CTO
Oy Realnode Ab

nordstrom@realnode.com
www.realnode.com

This however would require that the
ticket doesn’t get updated when escalated. Is this doable?

If that’s the requirement, then no. Every time you change a ticket in
some way, that event is recorded so that you have a history of the
changes. What you really want is if there hasn’t been a certain kind of
change within a specific time period, then you want to do some action.

Russell Mosemann, Ph.D. * Computing Services * Concordia University, Nebraska
"Help! I’ve crashed and I can’t boot up!" - Console message

Russell Mosemann wrote:

If that’s the requirement, then no. Every time you change a ticket in
some way, that event is recorded so that you have a history of the
changes. What you really want is if there hasn’t been a certain kind of
change within a specific time period, then you want to do some action.

Ok, that sounds reasonable.
I tried to look through the code but haven’t been able to spot an easy
way to find tickets with e.g. no correspondence within a specified
amount of time.

I’ve also discovered that a ticket doesn’t contain the Cc field, how
would I find this?

Is there any API documentation available online somewhere?

Thanks!

Mattias Nordstrom
CTO
Oy Realnode Ab

nordstrom@realnode.com
www.realnode.com

Mattias Nordstrom wrote:

Ok, that sounds reasonable.
I tried to look through the code but haven’t been able to spot an easy
way to find tickets with e.g. no correspondence within a specified
amount of time.

I’ve also discovered that a ticket doesn’t contain the Cc field, how
would I find this?

Is there any API documentation available online somewhere?

I found lots of usable stuff (inc. Cc) in lib/RT/Ticket_Overlay.pm so
that’s not a problem. I’m still struggling with the no correspondence
within a specified time info. What RT object contains this info?

Mattias Nordstrom
CTO
Oy Realnode Ab

nordstrom@realnode.com
www.realnode.com

I found lots of usable stuff (inc. Cc) in lib/RT/Ticket_Overlay.pm so
that’s not a problem. I’m still struggling with the no correspondence
within a specified time info. What RT object contains this info?

share/html/Ticket/Elements/ShowHistory has code that walks the
transactions associated with a particular ticket. It is the information
that is displayed in the History section when you view an individual
ticket.

Russell Mosemann, Ph.D. * Computing Services * Concordia University, Nebraska
"I guess we all have our burdens to share." - me

I’m not so sure this is the case; I have the following in one of my scrips:

Don’t RecordTransaction, else a Scrip loop will occur!

$self->TicketObj->AddCustomFieldValue (Field => $cf->id,
Value => $newValue,
RecordTransaction => 0);

Setting RecordTransaction to 0 MAY prevent the Updated field from being
updated - I haven’t tested or checked the code.

-=| Ben

[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Russell
MosemannSent: Wednesday, March 02, 2005 7:27 AM
To: Mattias Nordstrom
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] Ticket Escalation without Updated field being
updated

I’m not so sure this is the case; I have the following in one of my scrips:

Don’t RecordTransaction, else a Scrip loop will occur!

$self->TicketObj->AddCustomFieldValue (Field => $cf->id,
Value => $newValue,
RecordTransaction => 0);

That approach works. Copy lib/RT/Action/EscalatePriority.pm to
EscalatePriority_Local.pm and change the line at the bottom in Commit from

my ($val, $msg) = $self->TicketObj->SetPriority($self->{‘prio’});

to

my ($val, $msg) = $self->TicketObj->_Set(Field => ‘Priority’,
Value => $self->{‘prio’},
RecordTransaction => 0);

Of course, use at your own risk. This will keep long-term tickets from
filling up with priority change transactions when escalated.

Russell Mosemann, Ph.D. * Computing Services * Concordia University, Nebraska
"More flour! Scotty, we need more flour!" - Capt. Kirk in the galley

Russell Mosemann wrote:

That approach works. Copy lib/RT/Action/EscalatePriority.pm to
EscalatePriority_Local.pm and change the line at the bottom in Commit from

my ($val, $msg) = $self->TicketObj->SetPriority($self->{‘prio’});

to

my ($val, $msg) = $self->TicketObj->_Set(Field => ‘Priority’,
Value => $self->{‘prio’},
RecordTransaction => 0);

Of course, use at your own risk. This will keep long-term tickets from
filling up with priority change transactions when escalated.

I made the change. This doesn’t record the change in history which is a
good thing and solves one problem. The Updated date is updated however.

Mattias Nordstrom
CTO
Oy Realnode Ab

nordstrom@realnode.com
www.realnode.com

Mattias Nordstrom wrote:

I made the change. This doesn’t record the change in history which is a
good thing and solves one problem. The Updated date is updated however.

Ok, I tweaked UntouchedInHours.pm to use the ticket history instead of
Updated. If anyone wants a copy of my modification feel free to mail me.

Mattias Nordstrom
CTO
Oy Realnode Ab

nordstrom@realnode.com
www.realnode.com