- Request Tracker (RT) on help.mit.edu
- Request Tracker queue administrators – you have to be one to follow these instructions
All messages received by the same address on the RT server will create tickets in the same queue, even if the "To" addresses are different. For example, if the Tooltime queue's main email address "email@example.com" but you also have a alias, "firstname.lastname@example.org", both will create tickets in the Tooltime queue. Sometimes you may want an indication of which address the message was sent to, to automatically categorize or assign it. This can be done with a custom Scrip which examines the header of the incoming message and takes action based on the "To" line. The below example illustrates how to set a custom field based on the "To" address in the header.
|1||Navigate to Tools > Configuration > Queues > Select, find your queue in the list and click on it to go to its configuration screens|
|2||Navigate to the Scrips tab menu and select Create to create a new Scrip|
|3||Fill out the create screen as follows:
|4||Fill out the "Custom condition", "Custom action preparation code", and "Custom action cleanup code" code boxes as follows. If you do not see those three boxes for entering custom code, you may not have the necessary permissions to write Perl code on the system. Contact your queue admin, or email@example.com if you need this access.|
|5||Double-check your code and click the Create button to save your changes|
That's it! Test your new Scrip by sending email to your queue at both addresses, and verify that the custom field is set on creation.
- Remember to substitute your own queue name, custom field name, custom field value, and email address!
- Test your scrip before you advertise the functionality to your team; scrips work independently, so if there is an error in your scrip, this feature will not work but it should not impact the general operation of your queue
- Consider a slighly more complicated Perl conditional such as if-elsif-else if you need to check for multiple email addresses and set multiple custom field values