summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Action/EscalateQueue.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-04-27 14:25:58 -0700
committerMark Wells <mark@freeside.biz>2012-04-27 14:25:58 -0700
commit141c6ddb6daccb5546e35ba98131a30c4a64ee1d (patch)
tree89e516c7f9b12bb1980126274c63e8483872e928 /rt/lib/RT/Action/EscalateQueue.pm
parent8898d63f1a0be81775ecef61094d62129ea6ff38 (diff)
fix some warnings in ticket escalation, #17417
Diffstat (limited to 'rt/lib/RT/Action/EscalateQueue.pm')
-rwxr-xr-xrt/lib/RT/Action/EscalateQueue.pm21
1 files changed, 12 insertions, 9 deletions
diff --git a/rt/lib/RT/Action/EscalateQueue.pm b/rt/lib/RT/Action/EscalateQueue.pm
index adafbdfb7..2775a8384 100755
--- a/rt/lib/RT/Action/EscalateQueue.pm
+++ b/rt/lib/RT/Action/EscalateQueue.pm
@@ -116,15 +116,18 @@ sub Commit {
if ( my $due_in = $new_queue->DefaultDueIn ) {
$Due->SetToNow;
$Due->AddDays( $due_in );
- }
- ( $val, $msg ) = $ticket->_Set(
- Field => 'Due',
- Value => $Due->ISO,
- RecordTransaction => 0,
- );
- if (! $val) {
- $RT::Logger->error( "Couldn't set new due date: $msg" );
- return (0, $msg);
+
+ if ( $Due->ISO ne $ticket->Due ) {
+ ( $val, $msg ) = $ticket->_Set(
+ Field => 'Due',
+ Value => $Due->ISO,
+ RecordTransaction => 0,
+ );
+ if (! $val) {
+ $RT::Logger->error( "Couldn't set new due date: $msg" );
+ return (0, $msg);
+ }
+ }
}
return 1;
}