Commit a9407e7f authored by Wallace Reis's avatar Wallace Reis
Browse files

Merge branch '4.2/simple-template-cf' into 4.2-trunk

parents 2032d888 546fc6c2
......@@ -129,7 +129,9 @@ use. Among them:
=item $TicketCF(Name)
For example, C<$TicketCFDepartment>.
For example, C<$TicketCFDepartment>. For CFs with more complicated
names, all non-word characters (anything that is not letters, numbers,
or underscores) are stripped to determine the appropriate variable name.
=item $TransactionType
......
......@@ -640,7 +640,10 @@ sub _MassageSimpleTemplateArgs {
my $cfs = $ticket->CustomFields;
while (my $cf = $cfs->Next) {
$template_args->{"TicketCF" . $cf->Name} = $ticket->CustomFieldValuesAsString($cf->Name);
my $simple = $cf->Name;
$simple =~ s/\W//g;
$template_args->{"TicketCF" . $simple}
= $ticket->CustomFieldValuesAsString($cf->Name);
}
}
......@@ -651,7 +654,10 @@ sub _MassageSimpleTemplateArgs {
my $cfs = $txn->CustomFields;
while (my $cf = $cfs->Next) {
$template_args->{"TransactionCF" . $cf->Name} = $txn->CustomFieldValuesAsString($cf->Name);
my $simple = $cf->Name;
$simple =~ s/\W//g;
$template_args->{"TransactionCF" . $simple}
= $txn->CustomFieldValuesAsString($cf->Name);
}
}
}
......
Supports Markdown
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