Skip to content

#11395: Fix TOC group is not restored in correct position when it has no direct child layer#11396

Merged
offtherailz merged 1 commit intogeosolutions-it:masterfrom
congchen1101:fix_toc_group_without_direct_layers_position
Dec 18, 2025
Merged

#11395: Fix TOC group is not restored in correct position when it has no direct child layer#11396
offtherailz merged 1 commit intogeosolutions-it:masterfrom
congchen1101:fix_toc_group_without_direct_layers_position

Conversation

@congchen1101
Copy link
Copy Markdown
Contributor

Fix TOC groups without direct layers should be restored in correct position

  • Fixed an issue where newly created groups without direct child layers, but containing subgroups with layers, were not displayed in the correct position after saving
  • Added test cases to cover groups with only subgroups

On behalf of DB Systel GmbH

Description

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix

Issue

What is the current behavior?

#11395

What is the new behavior?

Group without direct child layer is stored in correct position.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

fix(TOC): ensure groups without direct layers are restored in correct position

- Fixed an issue where newly created groups without direct child layers,
  but containing subgroups with layers, were not displayed in the correct
  position after saving
- Added test cases to cover groups with only subgroups

On behalf of DB Systel GmbH
@congchen1101 congchen1101 changed the title #11395 #11395: Fix TOC groups without direct layers should be restored in correct position Aug 22, 2025
@congchen1101 congchen1101 changed the title #11395: Fix TOC groups without direct layers should be restored in correct position #11395: Fix TOC group is not restored in correct position when it has no direct child layer Aug 22, 2025
@tdipisa tdipisa linked an issue Aug 22, 2025 that may be closed by this pull request
1 task
@tdipisa tdipisa added this to the 2025.01.02 milestone Aug 22, 2025
@tdipisa tdipisa requested a review from allyoucanmap August 22, 2025 13:59
@tdipisa tdipisa added bug BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch External Contribution labels Aug 22, 2025
@tdipisa tdipisa modified the milestones: 2025.01.02, 2025.02.00 Aug 28, 2025
@tdipisa tdipisa removed the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Aug 28, 2025
@tdipisa tdipisa added the BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch label Nov 4, 2025
@tdipisa tdipisa modified the milestones: 2025.02.00, 2025.02.01 Nov 4, 2025
@tdipisa tdipisa added backport 2025.02.xx and removed BackportNeeded Commits provided for an issue need to be backported to the milestone's stable branch labels Dec 12, 2025
@tdipisa tdipisa requested review from offtherailz and removed request for allyoucanmap December 18, 2025 09:39
@offtherailz offtherailz reopened this Dec 18, 2025
Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

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

I confirm, the algorithm looks correct to determine the sort order.
@ElenaGallo Here a map to replicate the issue.

test_map_groups_fixed.json

Importing this on dev will cause the test2 group to go to the bottom.
With the fix, the test2 group goes correctly in the middle.

@congchen1101 thank you very much for the fix 👍

@offtherailz offtherailz enabled auto-merge (squash) December 18, 2025 11:31
@offtherailz offtherailz merged commit 4108074 into geosolutions-it:master Dec 18, 2025
39 of 40 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 18, 2025
fix(TOC): ensure groups without direct layers are restored in correct position

- Fixed an issue where newly created groups without direct child layers,
  but containing subgroups with layers, were not displayed in the correct
  position after saving
- Added test cases to cover groups with only subgroups

On behalf of DB Systel GmbH

Co-authored-by: CongChen <cong.chen.mz@gmail.com>
(cherry picked from commit 4108074)
@github-actions
Copy link
Copy Markdown
Contributor

@ElenaGallo
Copy link
Copy Markdown
Contributor

Test passed on DEV, @offtherailz backport can be merged here: #11831

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TOC: Group without direct child layers are not restored in the correct position

7 participants