Skip to content

Scheduler: Multilevel grouping — Update group utils#34333

Open
sjbur wants to merge 3 commits into
feature/scheduler-multilevel-grouping/mainfrom
feature/scheduler-multilevel-grouping/update-group-utils
Open

Scheduler: Multilevel grouping — Update group utils#34333
sjbur wants to merge 3 commits into
feature/scheduler-multilevel-grouping/mainfrom
feature/scheduler-multilevel-grouping/update-group-utils

Conversation

@sjbur

@sjbur sjbur commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@sjbur sjbur self-assigned this Jul 16, 2026
@sjbur sjbur added the 26_2 label Jul 16, 2026
@sjbur
sjbur requested a review from Copilot July 16, 2026 09:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Scheduler resource grouping utilities to support hierarchical (parent/child) resources and to build group leafs based on hierarchy leaves (enabling multilevel grouping without treating hierarchy parents as selectable “bands”).

Changes:

  • Added helpers in group_utils.ts to build group nodes from either flat resource items or a hierarchy tree and to attach resources by leaf nodes.
  • Updated grouping logic to collect only hierarchy leaf nodes for groupLeafs while preserving the full hierarchy in groupTree.
  • Expanded Jest tests to cover hierarchical-only grouping, hierarchical+flat combinations, and empty-datasource edge cases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/devextreme/js/__internal/scheduler/utils/resource_manager/group_utils.ts Refactors grouping to support hierarchical resources and leaf-based attachment logic.
packages/devextreme/js/__internal/scheduler/utils/resource_manager/group_utils.test.ts Adds/updates tests for hierarchical grouping behavior and mixed resource scenarios.

Comment on lines +103 to +107
const nodes = createResourceNodes(resource);

if (leafs.length > 0 && isVirtualRoot(leafs[0])) {
head[0].children = nodes;
leafs = collectGroupLeaves(nodes);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid. Fixed and added regression test

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@sjbur
sjbur marked this pull request as ready for review July 16, 2026 13:54
@sjbur
sjbur requested a review from a team as a code owner July 16, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants