PATCH: Setting custom fields in templates

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

An equivalent patch was already commited to the repository. 3.0.7 will
contain it.

-jesseOn Mon, Nov 03, 2003 at 07:07:32PM +0200, Graeme Pyle wrote:

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


rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.