I want to group tasks with an array property, like this sample https://docs.dhtmlx.com/gantt/samples/02_extensions/28_tasks_grouping_relation_properties.html,
the simple code like this:
gantt.parse({
data: [
{
id: 6,
text: "Air conditioners check",
type: "task",
start_date: "03-04-2019 00:00",
duration: 7,
parent: "2",
progress: 0.6,
material: [{ resource_id: "7", value: 1 }],
priority: 2,
owner: ["2", "3"],
},
],
});
gantt.serverList("owner", [
{ key: 1, label: "Ilona" },
{ key: 2, label: "John" },
{ key: 3, label: "Mike" },
{ key: 4, label: "Anna" },
{ key: 5, label: "Bill" },
{ key: 6, label: "Floe" },
]);
gantt.groupBy({
groups: gantt.serverList('owner'),
relation_property: 'owner',
group_id: "key",
group_text: "label",
default_group_label: "Unassigned",
});
In the sample , it just generates a new group named ‘John,Mike’. But in my case , I hope it will be divided into two groups , the names are ‘John’ and ‘Mike’ . My scheme is to copy several new tasks during grouping and delete the copied tasks at the end of grouping. Is there a simpler way? thanks.