Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
best-practical
rt
Commits
a9407e7f
Commit
a9407e7f
authored
Aug 25, 2014
by
Wallace Reis
Browse files
Merge branch '4.2/simple-template-cf' into 4.2-trunk
parents
2032d888
546fc6c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/customizing/templates.pod
View file @
a9407e7f
...
...
@@ -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
...
...
lib/RT/Template.pm
View file @
a9407e7f
...
...
@@ -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
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment