LastUpdated should be ignored by ModifyDates

Hey there,

I tried around alot, but i can’t get it to work. I need the
LastUpdated-field not to be changed when someone changes the Due-Date of
a ticket.

This is what i acutally want to set-up:
A tool (rt-crontool for ex.) that searches tickets that has not been
modified since a given period of time. Modified means neither a comment
nor a correspondence. Modifying the Due-Date, Priority or whatever
should be ignored.

Any hints?

Greets,
joey

Hey,

noone around having an idea? :confused:

joey wrote:

joey wrote:

Hey,

noone around having an idea? :confused:

joey wrote:

I tried around alot, but i can’t get it to work. I need the
LastUpdated-field not to be changed when someone changes the Due-Date of
a ticket.

This is what i acutally want to set-up:
A tool (rt-crontool for ex.) that searches tickets that has not been
modified since a given period of time. Modified means neither a comment
nor a correspondence. Modifying the Due-Date, Priority or whatever
should be ignored.

We use a patch suppled by a user that, after applied, prevents the Last Updated
time to change. It applies the change to EscalatePriority.pm but I would
imagine all you’d have to do is alter the other necessary subs in other files:

sub Commit {
my $self = shift;

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

‘RecordTransaction => 0’ is what you want.

Mathew

Hey,

just tried this:

modify: ./lib/RT/Interface/Web.pm line: 1482

change this:
$DateObj->Set(Format => ‘unknown’, Value => $ARGSRef->{ $field . _Date’}

to this:
$DateObj->Set(Field => ‘due’, Format => ‘unknown’, Value => $ARGSRef->{
$field . ‘_Date’ }, RecordTransaction => 0);

Sadly its ignored and the LastUpdated-field will be still modified.

Mathew Snyder wrote:

joey wrote:

Hey,

noone around having an idea? :confused:

joey wrote:

I tried around alot, but i can’t get it to work. I need the
LastUpdated-field not to be changed when someone changes the Due-Date of
a ticket.

This is what i acutally want to set-up:
A tool (rt-crontool for ex.) that searches tickets that has not been
modified since a given period of time. Modified means neither a comment
nor a correspondence. Modifying the Due-Date, Priority or whatever
should be ignored.

We use a patch suppled by a user that, after applied, prevents the Last Updated
time to change. It applies the change to EscalatePriority.pm but I would
imagine all you’d have to do is alter the other necessary subs in other files:

sub Commit {
my $self = shift;

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

‘RecordTransaction => 0’ is what you want.
Mathew, method __Set is the lowest one in the group of setters. This
method just update a field, without writing transactions, ACL checks
or auto-updating LastUpdated and LastUpdatedBy fields. So in your
situation RecordTransaction argument is useless.

Joey, RecordTransaction argument is available in _Set method, but
anyway LastUpdated and LastUpdatedBy fields are auto-updated when you
use it, so the only way for is to use __Set method:
$ticket_obj->__Set( Field => ‘Due’, Value => $due_obj->ISO );

However, I must warn you. This method doesn’t write transactions, so
any scrip that triggers on due change will skip this change as such
change doesn’t exist for scrips.

Mathew

Best regards, Ruslan.