Skip to main content

links

Description

Optional. This is an array of objects that holds the links data.

Usage

links?: [
{
id: string | number,
source: string | number,
target: string | number,
relation: "relatesTo" | "requiredFor" | "duplicate" | "parent"
}, {...} // other links data
];

Parameters

Each link can include the following details:

  • id - (required) the unique identifier of the link
  • source – (required) the card ID where the link starts (for example, “Task A is required for Task B”)
  • target – (required) the card ID where the link ends (for example, “Task B depends on Task A”)
  • relation - (required) the type of link. You can choose from these types:
    • "relatesTo" - indicates a dependency where the current task is connected to another
    • "requiredFor" - shows that one task must be completed before the other
    • "duplicate" - marks tasks that are duplicates of each other
    • "parent" - indicates a parent (master) and child (slave) task relationship
info

To update links data dynamically, you can use the parse() method!

Example

const links = [
{
id: 1,
source: 2,
target: 5,
relation: "relatesTo",
}, {...} // other link data
];

new kanban.Kanban("#root", {
columns,
cards,
links
// other parameters
});

Change log: This property was updated in v1.7:

  • The masterId parameter was replaced by source
  • The slaveId parameter was replaced by target

Related articles: Working with data

Related sample: Kanban. Links between tasks