Skip to content

Commit

Permalink
make it compatible with 4.2
Browse files Browse the repository at this point in the history
2 changes:

* make CF names case insensitive
* stalled tickets won't be auto-opened by correspondances now, we need to open it manually.
  • Loading branch information
sunnavy committed Oct 3, 2013
1 parent 8bff61d commit 4d8b2bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/RT/Extension/SLA.pm
Expand Up @@ -494,7 +494,7 @@ sub GetCustomField {
return RT::CustomField->new( $RT::SystemUser );
}
my $cfs = $args{'Ticket'}->QueueObj->TicketCustomFields;
$cfs->Limit( FIELD => 'Name', VALUE => $args{'CustomField'} );
$cfs->Limit( FIELD => 'Name', VALUE => $args{'CustomField'}, CASESENSITIVE => 0 );
return $cfs->First || RT::CustomField->new( $RT::SystemUser );
}

Expand Down
6 changes: 4 additions & 2 deletions t/ignore-on-statuses.t
Expand Up @@ -72,12 +72,13 @@ note 'check that reply to requestors dont unset due date with KeepInLoop';
$ticket->Load( $id );
ok $ticket->id, "loaded ticket #$id";
$ticket->Correspond( Content => 'we are still working on this.' );
$ticket->SetStatus('open');

$ticket = RT::Ticket->new( $root );
$ticket->Load( $id );
ok $ticket->id, "loaded ticket #$id";

is $ticket->Status, 'open', 'ticket was auto-opened';
is $ticket->Status, 'open', 'ticket was opened';

my $tmp = $ticket->DueObj->Unix;
ok $tmp > 0, 'Due date is set';
Expand Down Expand Up @@ -139,12 +140,13 @@ note 'Check that failing to reply to the requestors is not ignored';
$ticket->Load( $id );
ok $ticket->id, "loaded ticket #$id";
$ticket->Correspond( Content => 'we are still working on this.' );
$ticket->SetStatus('open');

$ticket = RT::Ticket->new( $root );
$ticket->Load( $id );
ok $ticket->id, "loaded ticket #$id";

is $ticket->Status, 'open', 'ticket was auto-opened';
is $ticket->Status, 'open', 'ticket was opened';

my $tmp = $ticket->DueObj->Unix;
ok $tmp > 0, 'Due date is set';
Expand Down

0 comments on commit 4d8b2bc

Please sign in to comment.