Hi Team,
Thanks for your work, i am actually trying your Group module with Subgroups and i would like to know if it could fit for my project.
Here is a description of what i target :

i want group types as (that's only examples...): World, Country, Region.
i want them to be nested so [Region] is a subgroup of [Country] which is a subgroup of [World].
i want an user able to join a [Region] and then gain membership for all parents groups as :
-a "Country_A" group would end with all members from all [Region] groups who has "Country_A" as parent.
-a "World_A" group would end with all members from all [Country] groups who has "World_A" as parent.
So each time an user join a [Region], he gains membership to a parent Country & World.

I did some test on D7 and it seems that inheritance works one way, so an user joining a [Country] will become a member of all children [Region].
Is there any solution for me ?

Another mystery for me is how we know for a group which is his parent ? i see no field in my subgroup instance that refer to its parent.

Thanks for your help, hoping my goal could be reach with your module, OG tries were a little pain so far :)
Regards,

Comments

Lemon006 created an issue. See original summary.

LemonHardos’s picture

Issue summary: View changes
LemonHardos’s picture

Issue summary: View changes
Joel MMCC’s picture

I, too, would like to know more about using subgroups. In particular, with the #2317195: Allow more than one parent by node / subgroup patch installed, there is a checkbox for Groups as well as Nodes in the “Group Entities Setting” tab for allowing those to be in multiple Groups.

I know how to assign existing Nodes to Groups, but how do we assign a Group that’s created as a Subgroup of a given parent Group to also be a subgroup of another parent Group (of the same type) as well?

For instance, if one Group Type is called “Agency” and another is called “Project” and a Project is created by a certain Agency, if another Agency needs to be brought aboard for an existing Project, how do we do this? Unlike with Nodes, there appears to be no checkboxes on the Group Edit form for assigning parent Groups to existing Groups. In fact, I see no way in the UI to even see what the one Parent Group of a Subgroup is!

Joel MMCC’s picture

(Inadvertent duplicate comment submission due to Server 5xx Errors at drupal.org. My apologies.)

Joel MMCC’s picture

(Inadvertent duplicate comment submission due to Server 5xx Errors at drupal.org. My apologies.)

Joel MMCC’s picture

(Apologies for the duplicates. Got Server Error 5xxs from drupal.org when submitting the first two times.)

Joel MMCC’s picture

What, exactly. does Subgroups even do? I’ve created Subgroups by clicking “Add GroupType” (as opposed to “Add ContentType”) on the Parent Group’s View (landing?) page, which formed a URL of the form: “…/group/#/subgroup/add/grouptype” where “#” is the GID of the Group page I’m on, meaning I assume the Parent Group of any Group created using that link or URL).

Yet I see no difference in the resulting subgroup than in a non-subgroup created by “…/group/add/grouptype” as found on the “Add group” page at “…/group/add” I do see the inheritance configuration options configured at Group Types / Config / Subgroups at “…/admin/group/type/manage/grouptype/config/subgroup” which lists all of the Group Types (including the selected one) as vtabs on the left, and gives a checkbox to “Enable GroupType as a subgroup of this group type” followed by a “Configure inheritance” table of checkboxes to enable which Group Roles are inherited by Members of the various Subgroup Types given what Role(s) they have in the Parent Group.

But none of that tells me which Group is a Parent of which Subgroup(s), let alone how to change that. As I said, this is trivial (if laborious absent some means of doing it in bulk with Rules) with GNodes — when you Edit a GNode, you see a vtab that tells you about its Parent Group and allows you to select a new one (or multiple new ones if the #2317195: Allow more than one parent by node / subgroup patch is installed). No such vtab exists when Editing a Group. In fact, the only vtab that shows up at all is for an alternate Path URL. There is none for Revisions, Content Author, Published status, or any of the other usual features of Nodes, which makes some sense since Groups are Entities but not Nodes (as would be the case with the old OG which this is hoping to replace).

When I list the Groups at “…/admin/groups”, they’re not shown hierarchically. It seems to me that simply having a drag-and-drop hierarchical admin display of the groups, similar to moving Taxonomy Terms or Menu Items around in the standard Drupal Admin UI for those elements, would do the job of both showing which Groups are Subgroups of which other Groups, and allowing that to be easily changed (for single-Parent-Group inheritance, anyway — a different method would have to be implemented if Subgroups can have multiple Parent Groups).

Still, though, what would this actually do? As I said before (#4), you do already implement Group Roles Inheritance in Subgroups and allow some control over that. That handles Users (“Members”), but what about Content (GNodes)?

Let’s say that I have a Group Type of “Region” which can be its own Subgroup. A Region could be any geographic entity, such as a nation, state (or province or equivalent), county (or equivalent), city, facility (shopping center, school campus, whatever), etc. So it makes sense that, say, a Facility would be a Subgroup of a City which would be a Subgroup of a County which would be a Subgroup of a State, and so on. But what would that actually do with any content (GNodes) belonging to those?

Would content GNodes belonging to a State also be seen as belonging to, or at least some means of inherited from that could be handled in a Views Relationship, the Counties and Cities under it? Or vice-versa: if a GNode is created as belonging to a City, does it also belong to the immediate Parent Group above it (a County), and does that traverse up the chain of ancestors so that the State and Nation also are seen as having that particular GNode, in a way that can be accessed through Views Relationships?

At the very least, would it be possible to return a list of all Parent Groups in the ancestry of a given SubGroup, in an array that could then be assigned to a GNode upon creation by a Rule? Say that a GNode is created from the Austin (TX) Region Group Page via “Add ContentType” on that page, could a Rule be fired that would be able to determine the ancestry of “Austin” as being a SubGroup of “Travis County” which would be a Subgroup of “Texas” which would be a Subgroup of “USA” and assign that GNode (via the Multiple Parent Groups patch) to all of those at creation time? Or, absent that, would there be a way for this GNode belonging to Austin as being seen as indirectly belonging to Travis County, Texas, and the USA as well?

How would this work with the Members (Users)? Could a Member of the Texas State Region also see the Travis (and other Texas) County Regions, as well as the Austin (and other Texas) City Regions, and the GNodes that belong to them?

Soul88’s picture

Status: Active » Closed (outdated)

We thank everyone for their collaboration on this issue, but as the D7 version is no longer supported, we will now close all D7 issues to keep the issue queue a bit tidier. This information won't go anywhere, it just won't show up on the list of open issues anymore.

Please see: https://www.drupal.org/project/group/issues/3163655 and https://www.drupal.org/project/group/issues/3203863#comment-14100281 for more details.