Using field codes in email templates

A field code is a variable that is replaced with a specific field value. You can use field codes in email templates to populate emails with specific information about the item that triggered a notification or, in the case of an email acknowledgment, was imported via email. When an email is sent, field codes, which are enclosed in percent signs (%), are replaced with the corresponding data from an item. See Field codes for a list of field codes.

For example, the following email template is used for emails sent when test cases are assigned.

When the email is sent, the field codes in the template are replaced with the following information.

Field code Replaced with:
%TCUS_L% Test case label
%TCNUM% Test case number
%TCDTM% Test case modified date
%TCSUM_L% Test case Summary field label
%TCSUM% Test case Summary field value
%TCTYP_L% Test case Type field label
%TCTYP% Test case Type field value

When a test case is assigned, information similar to the following example is included in the sent email.

You can use the %CHNGHTML% field code in HTML email templates to include details about field changes in issues, requirements, requirement documents, test cases, and manual test runs. Content added to fields is displayed in green text and content removed from fields is displayed in red strikethrough text, making it easy to see the exact changes. This field code is only replaced in email sent from user or system notifications.

You can also use field codes in email subject lines. For example, 'Change to %SUMM%' results in a subject of 'Change to' appended with the issue Summary field value.

To insert a field code in an email template, click Insert Field Code. Select a code in the Select Field dialog box and click OK.