[rt-devel] PATCH: Setting custom fields in templates

Graeme Pyle graeme at raspberry.co.za
Mon Nov 3 12:07:32 EST 2003


Hi folks,

I found that RT 3.0.6 was unable to set custom fields from templates
because the regular expression used to match the key in the template
included a dash '-', which is automatically removed when the template is
parsed.

For example, you include "CustomField-3: hoohaa" in your template, but
RT strips the key to "customfield3" and not "customfield-3".

So, line 457 in "lib/RT/Action/CreateTickets.pm"

$key =~ /^customfield-(\d+)$/ or next;

should read

$key =~ /^customfield(\d+)$/ or next;

instead (dash removed).

Cheers,
Graeme





More information about the Rt-devel mailing list