In this article:
1. How to Create the Rule?
2. How to Set Up and Enable the Rule?
3. Practical Examples of Using the "Card is Moved" Rule
3.1. Example 1
3.2. Example 2
The "Card is Moved" business rule will trigger a predefined action (create, move, update, send a notification, call web service) whenever a card is moved to a predefined set of columns/swimlanes.
A typical example is to change the card owner when a card is moved to the "In Progress" column.
1. How to Create the Rule?
Only users with "Account Owners" or "Manage Business Rules" privileges can create business rules.
To configure the business rule, please go to the Administration panel at the top right side of your screen → open the Business rule tab → select the "Card is moved" rule option.
Note: In case there is a set of defined rules to your account → use the Add new rule button at the upper right side of the panel.
2. How to Set Up and Enable the Rule?
The "Card is Moved" configuration panel has the following fields and properties:
(1) Name — give a name of the rule to distinguish it.
(2) Description — provide a description of the rule behavior in the system.
Note: when a business rule is created, it will get a rule ID and will be made available in the Business rule panel under name and description.
PRO tip: You can specify the board name in the rule name in order to easily distinguish rules configured for each of your boards.
(3) Share with — this option allows you to share the rule with other users in the system so that they can edit/disable/enable the rule.
Every business rule has three main control settings: When; And; Then.
It is a sort of "point-and-click" programming language with which you can automate any process. The way it works is based on the programming conditional statement “if this then that.”
To save/enable a rule, click on the Save button at the lower right corner of the configuration panel.
(4) WHEN - this is the event that will trigger an action when a card is moved.
(5) AND - define the filters and select the conditions under which the actions should be triggered. You have to set up a board via the Position set link.
Use "Add new property" to further configure the automation. Select a regular or custom field from the panel (for example - Tag is: "not confirmed").
As a result, the rule will be triggered only for cards with the specific tag, which are moved to the selected column/lane of the defined board in the position.
(6) THEN: Select an event that will happen if the moved card matches your filter:
- create cards or subtasks - click on add new action and use the supporting panel to select the type of cards you want to create i.e. a new card, a child card, a parent card, relative card, or a subtask. You can then copy the details of the original card onto the new card from the "Copy Card Details" modal that opens.
Note that you can create multiple cards/subtasks and the cards can be rearranged in order to be created in the desired sequence - simply drag and drop a card to rearrange it before or after another.
Note that subtasks cannot be rearranged within the rule configuration, so in case you have a subtask among the cards that are to be created, you would not be able to move a card on the subtask's position.
When you make your choice, please define the new card/child/parent/relative/subtask position via the board minimap.
- update the card details - click on add new action and update the properties that you want to update when a card is created. Select any of the available options and set it up.
- send notifications - click on add new action
Every time "a card is created," a user or a set of users will receive an email if you select to configure this option and create a template for the email notification, which is to be sent.
- In 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 that will be notified. The "add custom field" option is used 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, board name, card ID, and the text “New card created.” You can modify the title by clicking on "add card fields" and selecting your preferred card properties to display. You can remove all fields and write a custom title.
- Email body: you can either keep the predefined text or change it according to the information you want to share with the users.
- move the card - click on add new action to open the Board Minimap option and select where to move the card that has been created → select a Board (1) from the dropdown list and select a position (2) (column/lane) at the board minimap.
- invoke web service - click on add new action to add a call to an external web service. To configure it, select "not set" and set the parameters.
You can configure the following options:
- Name – a human-readable identifier for the web service call
- URL – the address of the endpoint service
- Method – which HTTP method should be used for the call (available options are POST, GET, HEAD, PUT, DELETE, OPTIONS, PATCH)
- Authentication – NONE or BASIC authentication supported for the moment
- HTTP Body – Whether you want to send the payload as raw JSON-encoded values, directly in the HTTP body
- Parameters – parameters to be sent to the endpoint service
- Headers – custom headers to be sent to the endpoint service
To send the parameters in the body of the web service call → activate the checkbox.
Additionally, the POST, PUT, DELETE, and PATCH requests send an additional parameter – ‘kanbanize_payload’ that contains information about the card that has been created or moved. The payload is in the following format:
{
“trigger” : “taskCreated”,
“timestamp” : “2015-03-04T14:19:38+00:00”,
“card” : {
“taskid” : “35156”,
“title” : “”,
“description” : “”,
“tcolor” : “#34a97b”,
“priority” : “Average”,
“size” : null,
“owner” : “testAdmin”,
“deadline” : null,
“typeName” : “”,
“tags” : “”,
“extLink” : “”,
“reporter” : “testAdmin”,
“createdAt” : “2015-03-04 14:19:33”,
“columnname” : “Requested”,
“lanename” : “Default Swimlane”,
“boardName” : “my board”,
“customFields” : [
],
“boardid” : “131”
}
}
When the payload is received by the endpoint, the content of “kanbanize_payload” can be parsed and the required actions can then be performed by the external system.
Click on the green plus sign to add a parameter. Select a field you wish to set as а parameter → click on Apply.
When you have configured your parameters, use the Test Settings button to send a pre-scanned request for testing and debugging purposes only. Click on Save Service to save the configuration.
Learn more in our API documentation.
- convert subtasks into child cards - click on add new action
You can use this action to convert a card's subtasks into child cards with the same title and any attachments preserved.
To enable the rule → click on the green checkmark at the top right corner of the configuration panel. With the red x-sign you can cancel the rule creation.
3. Practical Examples of Using the "Card is Moved" Rule
This rule comes in handy when information needs to be changed when a card is moved to specific columns or swimlanes.
Example 1
In a software development scenario, this rule can be used when communicating between the Developer and QA Boards. For example, whenever a card is moved to “Done” on the Developer board, a relative is created on the QA board.
Example 2
On the other hand, for example, if there is a "For Approval" column on the board and one person is in charge of approving, then a rule can be created about it. The rule will go as follows:
Whenever a card is moved to the "For Approval" column, change the owner to the supervisor and put a "Waiting for Approval" blocker.