%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
my @lines;
while ( my $CustomField = $CustomFields->Next ) {
my %line;
- $line{'Name'} = "'$TicketSQLField.{" . $CustomField->Name . "}'";
+ $line{'Name'} = "$TicketSQLField.{" . $CustomField->Name . "}";
$line{'Field'} = $CustomField->Name;
# Op
}
# Value
- if ($CustomField->Type =~ /^Date(Time)?$/) {
- my $is_datetime = $1 ? 1 : 0;
- $line{'Value'} = {
- Type => 'component',
- Path => '/Elements/SelectDate',
- Arguments => { $is_datetime ? (ShowTime => 1) : (ShowTime => 0), },
- };
- } else {
- $line{'Value'} = {
- Type => 'component',
- Path => '/Elements/SelectCustomFieldValue',
- Arguments => { CustomField => $CustomField },
- };
- }
+ $line{'Value'} = {
+ Type => 'component',
+ Path => '/Elements/SelectCustomFieldValue',
+ Arguments => { CustomField => $CustomField },
+ };
push @lines, \%line;
}