# create a custom field with nonascii name and try to add a condition
{
my $cf = RT::CustomField->new( RT->SystemUser );
- $cf->LoadByName( Name => "\x{442}", Queue => 0 );
+ $cf->LoadByName( Name => "\x{442}", LookupType => RT::Ticket->CustomFieldLookupType, ObjectId => 0 );
if ( $cf->id ) {
is($cf->Type, 'Freeform', 'loaded and type is correct');
} else {
ok( $response->is_success, "Fetched " . $url."Search/Build.html" );
ok($agent->form_name('BuildQuery'), "found the form once");
- $agent->field("ValueOf'CF.{\x{442}}'", "\x{441}");
+ $agent->field("ValueOfCF.{\x{442}}", "\x{441}");
$agent->submit();
is( getQueryFromForm($agent),
- "'CF.{\x{442}}' LIKE '\x{441}'",
+ "CF.{\x{442}} LIKE '\x{441}'",
"no changes, no duplicate condition with badly encoded text"
);