diff --git a/application/Espo/Tools/Kanban/Api/GetData.php b/application/Espo/Tools/Kanban/Api/GetData.php index b91a23ef61..77edc79716 100644 --- a/application/Espo/Tools/Kanban/Api/GetData.php +++ b/application/Espo/Tools/Kanban/Api/GetData.php @@ -56,9 +56,16 @@ class GetData implements ActionAlias $result = $this->service->getData($entityType, $searchParams); + $list = []; + + foreach ($result->getGroups() as $group) { + $list = [...$list, ...$group->collection->getValueMapList()]; + } + return ResponseComposer::json([ 'total' => $result->getTotal(), 'groups' => array_map(fn ($it) => $it->toRaw(), $result->getGroups()), + 'list' => $list, ]); } }