Recursive Groupby in Lists stop working as expected

With Area database in space

And many to many relation

Before 16.05 was showing only expected hierarchy
But after 16.05 it shows child entities on top level

Levels setup

By adding projects as childs to projects

It stop showing projects at all

Template workspace


Thank you for the reporting the bug. Honestly, we never keep in mind the case of many-to-many recursive hierarchies and never tested it. The possibility to create such a List was accidentally unlocked several weeks ago, together with the new List setup (with Groups). You can check, you cannot create a Smart Folder with the same setup in the old UI.

The simplest solution would be just to lock it back, and it feels right for me because in the case of many-to-many relation, the data structure is not a hierarchical tree, but rather a network, so the List it’s just not a suitable visualization for it.

But, to make the final decision, I would like to understand your use case, could you please explain why do you need many-to-many self-relation in your Area <-> Project setup, and why one-to-many doesn’t work for you?

Just because of how many-to-many relation works)))
I need some child areas be parts of different parent areas.

Could you provide a real example? It’s actually hard for me to imagine.

Not sure it’s practical, but another solution could be to add a “Strict Tree” flag on M2M relations to disallow linking entities that would break the strict hierarchy - i.e., disallow linking a new child entity that is already an ancestor.

I imagine that could be technically quite difficult, given that the hierarchy is functionally unlimited in levels, so checking every ancestor branch could be prohibitively resource-intensive/time-consuming

OK, real example.
Area 1: Compliance
Area 2: International relations
Subarea for boths: Compliance with international legislation

1 Like

I’m thinking about it all the time, but it’s really technically challenging, as Chris mentioned. You need to have the whole network in memory and analyze it every time you make linking. It can be done only on the backend, I am afraid. And it will never been a priority.

Fine. I just point that it was working one week ago, and now it does not work.

After some deliberation, I finally prohibited the creation of such views in production. But I hope it’s temporary and at the end of the week, I will be able to dive into your case.

Hi there, again :slight_smile:

We fixed the many-to-many relations for your case in the recent release. Feel free to use it and provide your feedback on whether it works correctly now or not.