[Rt-commit] r5814 - in RT-Action-LinearEscalate: .
kevinr at bestpractical.com
kevinr at bestpractical.com
Thu Aug 24 15:18:48 EDT 2006
Author: kevinr
Date: Thu Aug 24 15:18:47 2006
New Revision: 5814
Modified:
RT-Action-LinearEscalate/ (props changed)
RT-Action-LinearEscalate/lib/RT/Action/LinearEscalate.pm
Log:
r27587 at sad-girl-in-snow: kevinr | 2006-08-24 15:17:55 -0400
* Only update the priority if we'd be setting it to a higher priority (ie.
never reduce the priority).
Modified: RT-Action-LinearEscalate/lib/RT/Action/LinearEscalate.pm
==============================================================================
--- RT-Action-LinearEscalate/lib/RT/Action/LinearEscalate.pm (original)
+++ RT-Action-LinearEscalate/lib/RT/Action/LinearEscalate.pm Thu Aug 24 15:18:47 2006
@@ -207,24 +207,26 @@
if defined $2;
}
- unless ($RecordTransaction) {
- unless ($UpdateLastUpdated) {
- ( $val, $msg ) = $self->TicketObj->__Set( Field => 'Priority',
- Value => $self->{'prio'},
- );
+ if ($self->TicketObj->Priority < $self->{'prio'}) {
+ unless ($RecordTransaction) {
+ unless ($UpdateLastUpdated) {
+ ( $val, $msg ) = $self->TicketObj->__Set( Field => 'Priority',
+ Value => $self->{'prio'},
+ );
+ }
+ else {
+ ( $val, $msg ) = $self->TicketObj->_Set( Field => 'Priority',
+ Value => $self->{'prio'},
+ RecordTransaction => 0,
+ );
+ }
}
else {
- ( $val, $msg ) = $self->TicketObj->_Set( Field => 'Priority',
- Value => $self->{'prio'},
- RecordTransaction => 0,
- );
+ ( $val, $msg ) = $self->TicketObj->SetPriority( $self->{'prio'} );
+ }
+ unless ($val) {
+ $RT::Logger->debug( $self . " $msg\n" );
}
- }
- else {
- ( $val, $msg ) = $self->TicketObj->SetPriority( $self->{'prio'} );
- }
- unless ($val) {
- $RT::Logger->debug( $self . " $msg\n" );
}
}
More information about the Rt-commit
mailing list