Examples
- Picking assignees automatically
- Inviting assignees automatically
- Changing an issue's status after creating a link
- Sending a notification when an issue is created from an email
- Sending a notification when an issue is created based on a form
- Automatically adding a form to the issue comments
- Automatically adding issues to the board
- Sending notifications to instant messengers
Let's look at some examples of how triggers work in Tracker:
-
How to automatically pick assignees based on their status or component.
-
How to automatically invite assignees based on the status or field value.
-
How to automatically change an issue's status after adding a certain type of link to it.
-
How to automatically notify a user after an issue was created based on a request sent to the support team via email.
-
How to automatically notify a user after an issue was created based on a request sent to the support team via Yandex Forms.
-
How to automatically add a form to the issue comment.
-
How to set up notifications in messengers via HTTP requests.
Picking assignees automatically
Different stages of a project are often handled by different employees. When an employee does their part, they transfer the issue to another assignee. In Tracker, each issue stage has its own status. When an issue receives a status update, a new employee can be automatically assigned to work on the issue with a trigger.
However, sometimes employees only handle issues related to their field of expertise and don't collaborate on a single issue. For example, each support team member only processes requests related to the product they were assigned to. To manage this kind of workflow, you can configure components so that they correspond to specific products. When a specific component is added to the issue, the employee responsible for the corresponding product is automatically assigned to work on it via a trigger.
Let's set up a trigger that automatically picks an assignee for our issue:
-
Make sure every employee you might want to assign has full access to Tracker.
-
Go to the queue settings, open the Triggers section, and click Create trigger.
-
Enter the trigger name.
-
Set the trigger to fire when the issue's
Status
orComponents
change:-
Choose Conditions to be met → All.
-
Add the condition Event type → Issue changed.
-
If you want a new assignee to be picked after a status update, add the following condition: System → Status → Field value became equal to and specify the status. The available statuses depend on the workflow set up for the queue.
If you want a new assignee to be picked after a component changes, add the following condition: System → Components → Field value became equal to and specify the components.
Note
This trigger only works if only one component is specified in the issue.
-
-
Set a trigger action:
-
Add the action Update fields.
-
Choose System → Assignee → Set value and specify who should be picked as the assignee after the trigger is fired.
-
-
Save your trigger.
To see if you trigger works, pick any issue from the queue with the added trigger and change the issue's status or components.
Inviting assignees automatically
After completing an issue, the assignee may forget to specify some important information, such as time spent. In this case, you can configure a trigger that will automatically invite the assignee if the issue is closed and the time spent is not specified:
-
Go to the queue settings, open the Triggers section, and click Create trigger.
-
Enter the trigger name.
-
Set the trigger to react when the issue is closed with the
Time spent
field being empty:-
Choose Conditions to be met → All.
-
Add the condition System → Status → Field value became equal to → Closed. The available statuses depend on the workflow set up for the queue.
-
Add the condition Time Spent → Time spent → Field value is empty.
-
-
Set trigger actions:
-
Add the Add comment action.
-
Tap
, find the line Invite users from a field, and enter
Assignee
. -
Enter the comment to be displayed to the assignee and choose Send as robot.
-
-
Click Create to save the trigger.
When closing any issue that does not specify the time spent, the robot will create a comment and invite the assignee.
Changing an issue's status after creating a link
In many projects, issues depend on each other even if different people are working on them. If an issue affects the progress of one or more other issues, it's important to notify other team members if any problems arise. For example, you can link such issues to each other and set the link type Blocker to.
Let's set up a trigger that will change an issue's status and add a comment for its reporter when the Blocker to link is added:
-
Go to the queue settings, open the Triggers section, and click Create trigger.
-
Enter the trigger name.
-
Set the trigger to fire when the Blocker to link appears:
-
Choose Conditions to be met → All.
-
Add the following condition: Action with link → Link created → Blocking issue.
-
-
Set trigger actions:
-
Add the action Change issue status.
-
In the Next status field, select the status to switch the issue to when the condition is met. For example, Need info. The available statuses depend on the workflow set up for the queue.
-
Add the Add comment action.
-
Tap
, find the line Invite users from a field, and enter
Reporter
. -
Enter the comment to be displayed to the issue reporter and choose Send as robot. Otherwise, the comment is sent on behalf of the user who initiates the trigger action by adding the link.
-
-
Click Create to save the trigger.
Sending a notification when an issue is created from an email
Let's say the support team is processing user requests in Tracker. Users contact the support team via email, and those emails are used as the basis for issues in Tracker.
Let's set up a trigger that automatically sends an email to the user telling them that their request has been registered:
Step 1. Configure email integration
You need to set up email integration if you want to send emails right from Tracker and create issues from incoming emails:
-
Set up an email address for the queue to store issues created based on user requests.
If you can't create such an address, this means your organization doesn't have its own domain. You need a domain to create mailboxes and newsletters. This includes creating queue addresses. A domain is free to add in Yandex 360 for Business.
-
Set up sender names and signatures if needed.
-
If users aren't your organization's employees:
Step 2. Set up a trigger for sending email
Set up a trigger that automatically notifies users by mail when a new issue is created based on an email:
-
Go to the queue settings, open the Triggers section, and click Create trigger.
-
Enter the trigger name.
-
Set the trigger to fire when a new issue is created based on an incoming email:
-
Choose Conditions to be met → All.
-
Add the condition Event type → Issue created.
-
Add the condition Email → Created by email to → Equals string and enter the email address to your queue.
-
Enable Ignore case so that the queue address isn't case sensitive.
-
-
Set sending a message as the trigger action:
-
Choose the Add comment action.
-
Enable the Email option.
-
In the To field, add the variable with the address of the user who sent the request. To do this, select the To field, click Add variable, and choose Email → From.
-
Write the email. You can add issue parameters to the email by clicking the Add variable button.
-
-
Save your trigger.
To see if the trigger works, send an email to the queue address.
Sending a notification when an issue is created based on a form
Let's say the support team is processing user requests in Tracker. Users contact the support team via a feedback form created in Yandex Forms. A Tracker issue is then created based on that form.
Let's set up a trigger that automatically sends an email to the user telling them that their request has been registered:
Step 1. Configure email integration
You need to set up email integration if you want to send emails from Tracker:
-
Set up an email address for the queue to store issues created based on user requests.
If you can't create such an address, this means your organization doesn't have its own domain. You need a domain to create mailboxes and newsletters. This includes creating queue addresses. A domain is free to add in Yandex 360 for Business.
-
Set up sender names and signatures if needed.
-
If the users aren't your organization's employees, allow sending emails from issue pages to external addresses.
Step 2. Set up a form to register requests
To create issues from requests sent through forms:
-
Go to Yandex Forms and create a new form.
-
Add questions that let users provide relevant information necessary to register their request.
If you want to know the user's email address, add the Email question and make it a required field.
-
Set up your form's integration with Tracker:
-
Specify your queue and other issue parameters.
-
Use the Issue description field to add answers to the questions included in your form.
-
To save the user's email address in the issue settings, add the From field and select Variables → Answer to question → Email.
-
Save your integration settings.
-
-
Publish your form.
Step 3. Set up a trigger for sending email
Set up a trigger that sends automatic email notifications via a form when a new issue is created:
-
Go to the queue settings, open the Triggers section, and click Create trigger.
-
Enter the trigger name.
-
Set the trigger to fire when a new issue is created based on an incoming email:
-
Choose Conditions to be met → All.
-
Add the condition Event type → Issue created.
-
Add the condition Email → From → Field value became not empty..
-
-
Set sending a message as the trigger action:
-
Choose the Add comment action.
-
Enable the Email option.
-
In the To field, add the variable with the address of the user who sent the request. To do this, select the To field, click Add variable, and choose Email → From.
-
Write the email. You can add issue parameters to the email by clicking the Add variable button.
-
-
Save your trigger.
To see if your trigger works, fill out the form you integrated with Tracker.
Automatically adding a form to the issue comments
Using a trigger, you can add a form with auto-prefilled fields to the issue comments. To do this, add a special code with a link to the form in the comment text. Values can be passed to the form fields via GET parameters. For example, you can send issue parameters via variables available in triggers.
Let's set up a trigger that adds a feedback form to the comments and invites an assignee after the issue is closed:
Step 1. Create a feedback form
-
Go to Yandex Forms and create a form.
-
Add questions to the form so that the assignee can provide necessary information.
Step 2. Create a trigger to add the form
-
Go to the queue settings, open the Triggers section, and click Create trigger.
-
Set the trigger to fire when the issue is closed:
-
Choose Conditions to be met → All.
-
Add the condition Status → Field value became equal to → Closed.
-
-
Add the Add comment action.
-
In the comment text, insert the code:
{{=<% %>=}}/iframe/(src="https://forms.yandex.ru/surveys/<form_id>/?iframe=1&<question_id>=<value>" frameborder=0 width=500)
-
<form id>
is the ID of the form to be added. -
<question_id>
is the ID of the question. -
<value>
is the value to populate the form field.To transfer issue parameters to the form, use variables as values: click Add variable and choose your issue parameter. Then replace the
{{ }}
characters around the name of the variable with<% %>
.For example, to pass an issue key, use the
<%issue.key%>
value. To pass the username of an assignee, use the<%issue.assignee.login%>
value.
Code example where an issue key is passed to the form field:
{{=<% %>=}}/iframe/(src="https://forms.yandex.ru/surveys/68417/?iframe=1&answer_short_text_584943=<%issue.key%>" frameborder=0 width=100% height=660px scrolling=no}}
-
-
Click
, find the line Invite users from a field, and enter
Assignee
. -
Enable the Send as robot option.
-
Click Create to save the trigger.
Step 3. Add yndx-forms-cnt-robot@ to the queue
To ensure the form is inserted correctly, provide access to the queue for the yndx-forms-cnt-robot@ robot. To learn more about configuring access, see Setting access rights for queues.
Once the issue is closed, the robot will create a comment with the form and invite the assignee.
Automatically adding issues to the board
The new version of the issue board currently doesn't support filters that let you add issues to the board automatically. However, you can set up a trigger as a substitute for the feature.
You can also set up an auto action with similar conditions and outcomes. When using an auto action, issues that fit your desired conditions will be added to the board at preset intervals rather than all at once.
Warning
Triggers and auto actions work only for issues within the queue they were configured in.
Let's look at an example of a trigger that adds an issue to the board once a specific user is selected as the assignee for the issue:
-
Go to the queue settings, open the Triggers section, and click Create trigger.
-
Enter the trigger name.
-
Set the condition: Assignee → equals →
<User's name>
.Note
A trigger with this condition will also activate when a new issue with the selected assignee is created.
-
Set the action:
-
Select the action Update fields.
-
Select the Boards field.
-
Select Add to list and choose the board to add the issue to.
-
-
Save your trigger.
Sending notifications to instant messengers
Messengers are a great way to quickly notify employees about important events. If a messenger has an API, you can use Tracker to set up a trigger that sends HTTP requests to the messenger's API when certain events occur. For instance, a request can be triggered once an error with the critical priority status is added to the queue.
To view examples for setting up triggers that send notifications to Slack and Telegram, see Messenger integration.