In this article:
1. How to Create the Rule?
2. How to Set Up and Enable the Rule?
3. Practical Examples of Using the 'Time-based' Rule
This Business rule will automatically update, move, or send an email notification when a time-related rule is evaluated as true. A typical example would be to send a notification email one day before the deadline of a task or to move a card to a specific column when its start date is approaching.
1. How to Create the Rule?
Only users with "Account Owners" or "Manage Business Rules" privileges can create business rules.
Go to your Administration panel at the top right of your screen. Open the Business Rules tab and select the Time-based rule icon.
Note: If there is a set of defined rules to your account, click on the Add new rule button at the upper right side of the panel.
2. How to Set Up and Enable the Rule?
The "Time-based rule" configuration panel has the following fields and properties:
In the Name and Description fields, you can change the name of the rule and describe the scenario you will achieve with it. This way you can create an overview of your active business rules, as upon creation every automation is present in the Business Rules panel.
PRO tip: When naming the rule, you can include the board name so you can easily distinguish rules configured for each of your boards.
You can share the rule with other users (e.g. with a Workspace Manager of a board), if appropriate. In this case, they will be able to edit/disable/enable the rule.
Business Rules are a sort of "point-and-click" programming language with which you can automate any process. Each Business Rule has three main properties: When; And; Then.
Note: The time-based rule is executed every hour, and if the time-based condition is fulfilled, the configured action is triggered.
1. WHEN
Here you define the time-based condition that will trigger the action.
Click on Deadline → select one time-related card field → click on Change.
Set the condition by choosing an option from the dropdown and entering a value in the days field.
Important information about the operators:
- Operator: "is in"
For date custom fields (date custom fields where the 'show time' option is not enabled):
The number of days specified in the field's value (e.g. is in 1 day) is added to the current date so all results (cards) from the calculated date until the current date (included) are evaluated as TRUE and the rule would trigger for them.
For example: is in 1 day(s):
today <= field_value <= (today+field_value)
today <= 1 <= today+1
For datetime custom fields (date custom fields where the 'show time' option is enabled):
The number of days specified in the field's value (e.g. is in 1 day) are calculated in hours (i.e. 1 day = 24 hours) and are added to the current date so all results (cards) from the calculated date and time until the current date (included) are evaluated as TRUE, and the rule would trigger for them.
For example: is in 1 day(s):
today <= field_value * 24 <= (today+field_value)
today <= 1*24 <= today+1
- Operator: was X day(s) ago or earlier
For date custom fields (date custom fields where the 'show time' option is not enabled):
The number of days specified in the field's value is subtracted from the current date so all results (cards) from the calculated date (included) and before that are evaluated as TRUE and the rule would trigger for them.
For example: was 1 day(s) ago or earlier:
today - 1 day
For datetime custom fields (date custom fields where the 'show time' option is enabled):
The number of days specified in the field's value is subtracted from the current date so all results (cards) from the calculated date and time (included) and before that are evaluated as TRUE, and the rule would trigger for them.
For example: was 1 day(s) ago or earlier:
today - 24h
2. AND
Here you define the filters that specify the conditions under which the actions should be triggered.
- When you create a new rule, the Board filter will be applied by default. This means that the rule will be executed only for the boards you specify in the filter. You can use "or" to add extra boards and optimize the scope of the rule. Use the delete sign to remove the board.
- Click on the Add new property button to add extra filters, if necessary. Select a Regular field or/and a Custom field and click on Add.
For all time-related fields, you can select the following units: Days, Hours, Minutes, and Seconds.
When you have added the filter, set it up by clicking on Not set, or enter a value.
Note: You can add as many filters as you want by clicking on Add new property and repeating the steps.
3. THEN
Select an action to be triggered.
Click on Add new action under the type of action you wish to be triggered → select your preferred action if there are several options → click on Add → choose the value from the dropdown or click on Not set to configure it. You can add more than one action from a type by repeatedly clicking on Add new action and configuring it.
The following actions can be triggered:
1) Update the card details: The following card details can be updated:
Select a regular field or a custom field that you have created and added to the corresponding boards in your Workspaces → click on Add. Choose the value from the dropdown or click on Not set to configure the action.
Practical tip: When the cycle time of a card on board "X" is greater than "Y" days → change the color of the card to red.
2) Link the card: Link the card as a child, parent, predecessor, relative, or successor.
3) Send notifications: the system will notify a user of your choice when the time-based condition is fulfilled. Create a template for the notification, which is to be sent, and click on Save Message.
- For the To:/Cc: field → use the "add internal users" dropdown which opens a list of all users in your account including: Self, Owner, Watchers, Contributors, Reporter. Select and add the user/s you wish to be notified. The "add custom field" option is used in the following case: if you have a custom field with an email address and the created card contains this custom field, the notification will be sent to this email address.
- The subject of the notification email contains by default: the title of the executed rule, column name, board name, and card ID. You can modify the title by clicking on "add card fields" and selecting your preferred field/s or you can remove all fields and write a custom title.
- Email body: you can either keep the predefined text or modify it by deleting and creating new text.
Practical tip: When the cycle time of a card on board "X" is greater than "Y" days → the system will automatically send an email notifying a user (e.g. a Workspace Manager).
Note: The rule will send an email notification for a card that meets the set criteria only once, unless there is a status change (e.g., the card is updated or moved).
4) Move the card: choose where to move the card. Select a board from the dropdown and a position from the board minimap (you can select a cell or an entire column/swimlane by clicking on its name).
Practical tip: When the deadline of a card on board "X" is in 1 day → move the card to the "Follow up" column on the same board.
To enable the rule after configuring it → click on the Save button at the bottom right corner of the configuration panel.
Read more to find out how you can use the "Time-based rule" for "Email Tracking" on the Kanban Board.
3. Practical Examples of Using the 'Time-based' Rule
This rule comes in handy when dealing with actions based on the time left until a deadline, a start date, or the amount of time a card has spent in a column. The most common scenario is sending a notification 1 day before the deadline or moving a card into the "Deadline Tomorrow" column when the deadline is in 2 days.
You can also use it for more advanced scenarios like moving cards depending on their cycle time and you also have the option to make the business rule act under specific conditions for the cards like only using it on cards with a specific custom field.