Commit Graph

5 Commits

Author SHA1 Message Date
Bob Van Landuyt af0b8e0558 Only preload ancestors for search results in the specified parent
When filtering we want all to preload all the ancestors upto the specified
parent group.

- root
  - subgroup
    - nested-group
      - project

So when searching 'project', on the 'subgroup' page we want to preload
'nested-group' but not 'subgroup' or 'root'
2017-10-04 22:49:42 +02:00
Bob Van Landuyt ac0b104ae4 Minimize the number of queries by preloading counts and ancestors
By preloading the count of members, projects and subgroups of a group,
we don't need to query them later.

We also preload the entire hierarchy for a search result and include
the counts so we don't need to query for them again
2017-10-04 22:49:42 +02:00
Bob Van Landuyt cd85c22faa Rename hierarchies to descendants where applicable 2017-10-04 22:49:42 +02:00
Bob Van Landuyt cd8e1b85b6 Keep the `parent` method in `Project` 2017-10-04 22:49:41 +02:00
Bob Van Landuyt 22aa034427 Rename `GroupHierarchy` to `GroupDescendant` 2017-10-04 22:49:41 +02:00