On 6/21/07, Mathew Snyder <[EMAIL PROTECTED]> wrote:
joey wrote:
> Hey,
>
> noone around having an idea? :/
>
> 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.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com