عضوية المجموعة الهرمية (مجموعات داخل مجموعات)

For our running club, I’m coordinating a year-long challenge that has a team component. For each 10-year age-group team, I’m creating a Discourse group so they can be @mentioned and potentially have their own conversations, though I very much doubt anyone will figure that out. So I have seven groups for each of the age-group teams, and I have to update those manually as people register.

I also want to have an uber-group that contains all the people who are participating in the challenge. It would be a LOT easier if I could have the larger Challengers group merely contain the sub-groups for 19-and-under, 20-29, 30-39, and so on. That way I could just manage the sub-groups and have the changes flow through to the uber-group.

Is there (or could there be) a way to do this, or am I stuck having to manually type in every username from the sub-groups? (I think this will be several hundred people all told, and a weekly task.)

6 إعجابات

You should be same to use Bulk Add to Group, which will save you a lot of typing!

I don’t think we have plans to implement full hierarchical group membership resolution.

إعجابَين (2)

I keep being confused by references Bulk Add to Group, since it doesn’t appear in the UI as far as I can tell—the screenshots from the 2015 topic you linked to don’t match with what I see now. Is it just the same as using the Add Members dialog within a group?

And how can I copy a list of members of one group to be able to bulk add to another? The best workflow I can come up with at the moment is to copy the text of the Members page and use a style-savvy grep (in Nisus Writer Pro) to copy the usernames. Doable, but not exactly easy.

إعجاب واحد (1)

There are quite a few references to the “bulk add to group” feature here on Meta, but I don’t see it active anymore at https://discourse.example.org/admin/groups/bulk, just a blank page (I checked a couple different sites where I have admin rights). Do you see anything there @adamengst?

إعجاب واحد (1)

Sorry for the delay—missed the notification. No, I don’t have a page at

https://forum.fingerlakesrunners.org/admin/groups/bulk at all (404), and the main groups page is at FLRC Forum

No mention of Bulk Add anywhere that I can find.

إعجاب واحد (1)

I guess this is a bit of a hidden feature, but you can use the bulk invite feature to add existing users to groups. Just prep a csv with the email address and group as explained in the modal, and upload it. The users will not be emailed.

إعجابَين (2)

@tobiaseigen Aha! Do you happen to know if that would handle group updates for existing users if the email address in question already has an account?

Yes. That is precisely what I mean by this:

This feature seems to be doing double duty and we can improve the UI. I will propose something.

3 إعجابات

Awesome, thanks! Off to LibreOffice Calc I go! :keyboard:

إعجاب واحد (1)

Thanks! That’s getting closer, although I’ll note that keying off email address often works poorly for me because lots of people have multiple addresses, so I have to verify ahead of time whether I’m inviting the one that’s associated with an account or another one that will be confusing (and potentially set them up with a second account).

I don’t know how the underlying foundation works, but it would seem simplest to allow groups to contain references to other groups.

إعجاب واحد (1)

You could always do a user export and then use the exported CSV to create a new list to import back using the bulk invite feature. Sounds like you just need to do this once to get the system set up with your existing users, then manually when new people join or make a change to their age bracket.

Maye there’s a case for custom code to semi-automate this for your community - you could post a request in marketplace if you have a budget.

إعجاب واحد (1)

Good point on the user export—I wasn’t thinking about that as a way to populate the list with accounts to start. I’ll keep noodling on this and see how it works out.

إعجاب واحد (1)

المجموعات الهرمية (المجموعات كأعضاء في مجموعات) سيكون لها ميزة إضافية تتمثل في إزالة الأعضاء تلقائيًا من المجموعات الموروثة.

لتنفيذ مثل هذه الميزة “يدويًا”، سيتعين عليك تذكر ما إذا كان انتماء المجموعة موروثًا من مجموعة أعلى هرميًا أو تم تعيينه مباشرة.

هل يمكنك التعليق على استخدام خدمة دليل مستخدم خارجي (ldap) لتنفيذ وظيفة مجموعة هرمية؟

إعجابَين (2)

@angus أتساءل عما إذا كان GroupAssociatedGroup ينفذ بالفعل نية هذا الموضوع.

لا، هذه الميزة تتعلق بمزامنة المجموعات على الخدمات الخارجية مع مجموعات Discourse، وليس مع تسلسلات المجموعات الهرمية.

إعجاب واحد (1)

منذ أن بدأت هذا الموضوع، اعتقدت أنني سأشارك وأقول إن طلبي للمجموعات الهرمية لا يزال ذا صلة تمامًا.

ميزة “الدعوة الجماعية إلى المجموعة” ببساطة لا تلعب دورًا لأنني في حالتي، أضيف أشخاصًا إلى مجموعات محددة حسب العمر ومجموعة شاملة تغطي جميع المجموعات حسب العمر على مدى أربعة أشهر عند تسجيلهم في نظام آخر.

سأرى ما إذا كان بإمكان مطوري أتمتة العملية هذا العام، الآن بعد أن عرفت مدى صعوبة القيام بذلك يدويًا على أساس أسبوعي.

إعجاب واحد (1)

@adamengst هل هناك أي تقدم هنا؟

نعم، في الواقع تمكن المطور الخاص بي من مزامنة البيانات من Webscorer، الذي نستخدمه لتسجيل السباقات، مع مجموعات Discourse. يتطلب ذلك تطابق الأسماء، لكنه بنى صفحة مسؤول تُظهر متى لا تتطابق.

لذلك لا توجد تسلسلات هرمية، ولكننا نقوم بملء مجموعات متعددة تلقائيًا، مما يزيل الحاجة الرئيسية التي كانت لدي.

إنها شفرة مفتوحة المصدر لذا يمكنني على الأرجح مشاركتها إذا كان أي شخص مهتمًا بمعرفة كيفية عملها.

3 إعجابات

لقد تلقيت طلبًا مباشرًا لهذا أيضًا، لذا إذا أراد أي شخص إلقاء نظرة على كود @SteveDesmond.ca للكتابة إلى مجموعات Discourse، فهو متاح على:

وقال ستيف إنه سعيد بالإجابة على الأسئلة المتعلقة به.

إعجابَين (2)

إليك مخطط تفصيلي لـ الكود المحدد الذي ذكره آدم سابقًا:

  1. (L36) الحصول على جميع المستخدمين في النظام الخارجي
  2. (L37) الحصول على جميع المستخدمين في Discourse
  3. (L38-39) الحصول على جميع أعضاء المجموعات المعنية (global هي “المجموعة الفائقة” في هذه الحالة)
  4. (L46-78) لكل مستخدم في النظام الخارجي، تحقق مما إذا كان موجودًا في Discourse، وقم بتعيين المجموعات التي هو جزء منها بالفعل والتي يحتاج إلى إضافتها إليها
إعجاب واحد (1)