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+)$/ );
}
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;
}
}
$subfield = $rest{SUBKEY} || $pkey;
- my $table2;
# compound subkey: separate into table name and field in that table
# (must be linked by custnum)
$subfield = lc($subfield);