Commit 4d8b2bc4 authored by sunnavy's avatar sunnavy
Browse files

make it compatible with 4.2

2 changes:

* make CF names case insensitive
* stalled tickets won't be auto-opened by correspondances now, we need to open it manually.
parent 8bff61d9
......@@ -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 );
}
......
......@@ -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';
......@@ -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';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment