About triggers
Triggers automatically perform specific actions based on changes that occur on items. Each trigger has a rule, which is a set of criteria that specifies the filter that items must meet for the trigger to run, the change that causes it to run, and the action to perform. If all criteria in the rule are met when an item is saved, the trigger runs.
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 meets criteria in the trigger, it runs and performs the specified action.
Triggers can perform actions before or after items are saved to the project. They can run when the following actions occur:
|
|
Keep the following in mind:
- If items meet criteria for multiple triggers at the same time, the trigger rules are evaluated before and after the items are saved in the project. Triggers that run before items are saved perform actions in the following order: Prevent, Run Executable, Modify, Create Snapshot (requirement document triggers only), and Enter Event. Triggers that run after the items perform actions sequentially based on the order the changes occurred on the items.
- If the same change occurs on an item multiple times before saving, triggers for that change only run once.
Before save triggers perform actions when a user saves an item, but before the item is saved in the project database. These triggers can perform the following actions:
- Enter a workflow event on an item
- Modify item field values
- Prevent users from performing an action
- Run a server-side executable (script or compiled program)
- Create a requirement document snapshot
After save triggers perform actions after items are saved in the project database. These triggers can perform the following actions: