You are here: Configuring Projects > Configuring automation rules > Configuring Triggers > About triggers

About triggers

Triggers automatically perform actions based on activities that occur on items, such as issues. The TestTrack Server evaluates trigger rules when it receives a request to save items from TestTrack clients. For example, if a user makes changes in the Edit Issue dialog box, the trigger rule is evaluated when the user clicks OK or Apply to save the changes.

If an item passes the filter and activity in the trigger rule, the trigger runs and performs the action. Triggers can perform actions before or after items are saved in the project database.

Triggers can run when the following activities occur:

  • Items are created
  • Issues are merged
  • Test runs are generated
  • Items are assigned
  • Items change
  • Specific actions are added to items
  • Items change state
  • Items enter a specific state
  • Actions (workflow events) are added, edited, or deleted

 

Keep the following in mind:

About before save triggers

Before save triggers perform actions when the TestTrack Server receives a request to save items, but before the items are saved in the project database. Before save triggers can perform the following actions:

About after save triggers

After save triggers perform actions after items are saved in the project database. After save triggers can perform the following actions:

Trigger examples

Following are examples of common actions you can automate with triggers:

Automatically assign items based on workflow state—You want all issues in the Fixed state to be assigned to a specific tester for verification. You can configure a trigger that assigns Fixed issues to the appropriate tester.

Automatically assign items based on a field value—You want new test runs for a specific product on the Mac OS X platform to be assigned to a specific tester to run. You can create a filter that returns test runs with the product selected in the Product field and Mac OS X in the Operating System field. You can then create a trigger based on the filter that assigns the new test runs to the tester.

Prevent users from saving an item without file attachments—You want users to attach a screenshot when they add cosmetic issues. You can create a filter that returns issues with Cosmetic selected in the Type field that do not have attachments. You can then create a trigger based on the filter that prevents users from saving issues and display a message to explain that a screenshot must be attached to the issue.

Prepend an item summary with information based on a field selection—You want to add a value to the beginning of each test case summary that identifies the functional area the test case applies to. You can create filters for each value in the Component field. You can then create triggers based on the filters that prepend the functional area in the Summary field value when test cases are created.

Send item information to an external reporting system—You want to send issue information to an external reporting system after issues about a specific product are added to the project. You can create a filter that returns issues with the product selected in the Product field. You can then create a trigger based on the filter to run a script that sends the information to the reporting system after issues are saved.

Add issues to a release or iteration folder—You want to add issues that need to be addressed for a specific release or iteration to a folder. You can create a filter that returns issues with a specific value selected in a release or iteration custom field. You can then create a trigger based on the filter to add issues to a folder after they are saved.

Create a requirement document snapshot when a document is approved—You want to create a snapshot when it is approved to capture a version of the document for historical purposes. You can configure a trigger to create the snapshot when the document moves to the Approved workflow state.

 

Additional documentation  |  Knowledgebase  |  Blog  |  Technical support