Users who have completed the new user tutorial or have been members for over a year
Users belonging to client_1, client_2, or client_3 and are not an intern
Previously, solving this required custom scripts that periodically synchronized groups. The Dynamic Groups plugin eliminates that need.
This plugin introduces a boolean expression field to group settings, allowing administrators to define rules that dynamically determine group membership.
Examples:
users who are not in the ‘subscribers’ group trust_level_0 AND NOT subscribers
users who are not banned from posting in Marketplace trust_level_2 AND NOT banned_users
users who are on TL0 or TL1 but not on TL2 trust_level_0 AND NOT trust_level_2
users who completed the new user tutorial or are member for over a year badge:certified OR badge:anniversary
users who belong to client 1, 2 or 3 and are not an intern (client_1 OR client_2 OR client_3) AND NOT interns
Configuration
Once the plugin is installed and enabled, a new tab will appear in the group admin interface:
When you enter or update the boolean expression, the system will take a few moments to populate the group with matching users. From that point on, group membership will be automatically updated as user status changes.
Important:
When a rule is defined, the group is marked as automatic, disabling manual member changes. To revert the group to manual management, simply clear the expression field. The existing members will remain, and you’ll regain manual control.
אני משתמש כרגע ב-Discourse Dynamic Groups כדי להוסיף אוטומטית את כל המשתמשים הלא-אנונימיים לקבוצה מיוחדת. הביטוי הבוליאני שלי הוא:
NOT anonymous_users
התנהגות מצופה:
כשמשתמש חדש נרשם (שאינו שייך לקבוצת anonymous_users), הוא אמור להתווסף אוטומטית לקבוצה זו, ללא התערבות ידנית.
התנהגות בפועל:
משתמשים חדשים שנרשמים אינם מתווספים מיד לקבוצה. הם מתווספים רק לאחר שאני שומר מחדש באופן ידני את הביטוי הבוליאני בהגדרות הקבוצה.
זה אומר שהקבוצה לא מתעדכנת אוטומטית ככל שמשתמשים מצטרפים, אלא אם כן אני מפעיל סנכרון ידני.
אני מקבל את השגיאה: Unknown keyword, group or badge: 'anonymous_users'
אם אני משנה את שם הקבוצה לקבוצה האמיתית שלי, לדוגמה:
trust_level_0 AND NOT interns
אני עדיין מקבל: Unknown keyword, group or badge: 'interns'
בדקתי שוב ואני מעתיק את השם הייחודי של הקבוצה ישירות מדף ניהול הקבוצה, כך שאין שגיאות הקלדה.
האם יש משהו שאולי אני מפספס, או שיש משהו אחר שאני צריך להגדיר כדי שקבוצות מותאמות אישית יזוהו בביטוי?
בזמן שניסיתי לשחזר, זיהיתי שני באגים ואחד מהם כנראה פגע בך.
האם תוכל בבקשה לעדכן את הפלאגין לגרסה האחרונה 59640f1 ולבדוק אם זה פותר את הבעיה.
הפלאגין עדיין לא מתמודד טוב במיוחד עם שינוי שמות של קבוצות. אם אתה משנה שם של קבוצה, עליך לשמור את הכללים מכל הקבוצות שתלויות בה (פשוט הכנס רווח אחרי הביטוי הבוליאני והסר אותו שוב כדי להפעיל את כפתור השמירה). זה יטופל בגרסה מאוחרת יותר.
Users with trust level 1 are also members of the trust level 0 group. So the behavior is expected. You could exclude the trust level 1 group to only get TL0 users. Similar to the example from the first post