summaryrefslogtreecommitdiff
path: root/rt/lib
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib')
-rw-r--r--rt/lib/RT/Action/Accumulate.pm3
-rwxr-xr-xrt/lib/RT/Action/EscalateQueue.pm21
2 files changed, 14 insertions, 10 deletions
diff --git a/rt/lib/RT/Action/Accumulate.pm b/rt/lib/RT/Action/Accumulate.pm
index c4ca667ea..14675b894 100644
--- a/rt/lib/RT/Action/Accumulate.pm
+++ b/rt/lib/RT/Action/Accumulate.pm
@@ -23,7 +23,8 @@ the same name, and should be single-valued fields.
sub Prepare {
my $self = shift;
my $cfname = $self->Argument or return 0;
- $self->{'inc_by'} = $self->TransactionObj->FirstCustomFieldValue($cfname);
+ $self->{'inc_by'} = $self->TransactionObj->FirstCustomFieldValue($cfname)
+ || '';
return ( $self->{'inc_by'} =~ /^(\d+)$/ );
}
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;
}