1

We use RTs articles system mainly for answer templates - a dedicated class with just one text field that posts its value into the reply, so staff dosn't need to manualy copy and paste common texts.

One of these template is for mailing the user his specific settings. I need to make this template dynamic, so it derives the users settings automatically, instead of being filled by the staff member.

I already have the users identifiers saved in custom fields in the RT user objects, imported via LDAPImport RT-Extension from our LDAP server.

What I want to do is use Perl inline code in RT article field values just like in templates, e.g.

{ print "Hello World!"; }

This perlcode needs to run in the context of the ticket the article is used/pasted, so it can access the tickets requestor and therefore the custom field values.

Is this possible?

Alternatives I would consider:

  • Evaluating the perlcode when commit the reply, thus allowing inline perlcode in answers and comments. Sounds like about the same amount of work to me, but comes with a huuuuuuuuge security risk.

  • Using an actual dynamic template and trigger it somehow with a scrip. Would mean we really have to trust the system not to send out wrong customer data without us being able to check it first.

  • Using an external CGI to add a new answer with the RT API and a link on the ticket page to it. Kinda last resort option, but not what I want (and promised my boss)

Thanks for any help

LordOfTheRats
  • 103
  • 10

1 Answers1

1

I think the Article Templates extension should do what you need.

Jim Brandt
  • 280
  • 1
  • 4