From 2952c19ae4de750589ece524ce3005c07a82646c Mon Sep 17 00:00:00 2001 From: Emmanuel Lacour Date: Thu, 23 May 2024 15:07:51 +0200 Subject: [PATCH] Add test for LIKE search on numerical customfield --- t/ticket/search_by_cf_numeric.t | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/t/ticket/search_by_cf_numeric.t b/t/ticket/search_by_cf_numeric.t index 6bf1129e43b..05d43524492 100644 --- a/t/ticket/search_by_cf_numeric.t +++ b/t/ticket/search_by_cf_numeric.t @@ -52,6 +52,10 @@ $tickets->FromSQL(q{Queue = 'General' AND CF.test_cf < CF.test_cf2 }); is( $tickets->Count, 1, 'Found 1 ticket' ); is( $tickets->First->id, $tickets[1]->id, 'Found the small ticket' ); +$tickets->FromSQL(q{Queue = 'General' AND CF.test_cf LIKE 2 }); +is( $tickets->Count, 1, 'Found 1 ticket' ); +is( $tickets->First->id, $tickets[0]->id, 'Found the big ticket' ); + $tickets->FromSQL(q{Queue = 'General'}); is( $tickets->Count, 2, 'Found 2 tickets' ); $tickets->OrderByCols( { FIELD => 'CustomField.test_cf' } );