👷 !!WARNING!! This code is under development and is not ready for production use. You can use it on your own risk. I will appreciate on any help.
OTRS package that adds a text array type of dynamic fields
Let's assume, that for the Ticket object dynamic field TextArrayField has been created. So, you can search tickets containing specified string:
my $DynamicFieldObject = $Kernel::OM->Get('Kernel::System::DynamicField')->DynamicFieldGet(
Name => 'TextArrayField',
);
my @TicketIDs = $Kernel::OM->Get('Kernel::System::Ticket')->TicketSearch(
Result => 'ARRAY',
DynamicField_TextListExample => {
Contains => 'foo',
},
UserID => 1,
);You can specify an array of strings, if you want to find tickets, that contain at least one of the specified strings:
@TicketIDs = $Kernel::OM->Get('Kernel::System::Ticket')->TicketSearch(
Result => 'ARRAY',
DynamicField_TextListExample => {
Contains => [ 'foo', 'bar' ],
},
UserID => 1,
);