WordPress.org

Making WordPress.org

Opened 4 years ago

Last modified 10 days ago

#2214 new enhancement

Forums: Automate Support badges

Reported by: SergeyBiryukov Owned by:
Milestone: Q1 Priority: normal
Component: Support Forums Keywords:
Cc:

Description (last modified by carike)

[Updated proposal:
https://meta.trac.wordpress.org/ticket/2214#comment:23
This is based on renewed discussions on the matter in #forums and #meta on Slack.]

From August 18th Support Team Meeting Summary:

New Automated Badge Requirements

As we discussed last week, the Support Contributor and Support Team badges will be automated based on the following criteria:

Support Contributor = [x] replies. (tentatively 400 for the English forums)

Support Team = Moderator.

Today, this was approved by unanimous vote. The automation will begin once the bbPress 2 forum launches, and the tentative number of required replies will likely be adjusted per language forum as necessary. The Support Contributor badge will be permanent, like all other Contributor badges, while the Support Team badge can be removed by being demoted back to a standard forum member.

The forums are now on bbPress 2.x, so I guess it's time to look into this task.

Change History (36)

This ticket was mentioned in Slack in #forums by sergey. View the logs.


4 years ago

#2 @macmanx
4 years ago

Just clarifying that we later settled on 400 replies for the English forums, so that's no longer tentative: https://make.wordpress.org/support/handbook/contributing-to-the-wordpress-forums/volunteering-in-the-forums/

This ticket was mentioned in Slack in #forums by sergey. View the logs.


3 years ago

#4 follow-up: @danieltj
3 years ago

Is the source code for this open or closed source? Can a non-committer take a look at this (i.e. me)?

#5 in reply to: ↑ 4 @SergeyBiryukov
3 years ago

Replying to danieltj:

Is the source code for this open or closed source? Can a non-committer take a look at this (i.e. me)?

The two key components are both open-sourced:

However, neither of them is present in the Meta Environment yet, so it might be tricky to set up a local install. I'll document my experience of creating a local Support Forums install here:

  • Prerequisites:
  • Setup:
    • Add the following constants to wp-config.php:
      define('WPORGPATH', dirname(__FILE__) . '/wp-content/wporg/' );
      
      define('WPORG_SUPPORT_FORUMS_BLOGID', 1);
      define('WPORG_PLUGIN_DIRECTORY_BLOGID', 1);
      define('WPORG_THEME_DIRECTORY_BLOGID', 1);
      
    • Copy the downloaded header.php and footer.php files to WPORGPATH directory.
    • Install WP with http://wporg.dev/support as home URL (or create a new site on a Multisite network).
    • Activate bbPress.
    • Activate the support-forums plugin and other wporg-bbp-* plugins, if needed.
    • Switch to the wporg-support theme.
    • In Reading Settings, select a static page as a front page
    • Open the front page for editing and set bbPress - Support (Index) as page template.
    • Create a few test forums, topics, and replies.

That should be it for getting the Support Forums up and running locally.

I think a solution for this ticket would look like this:

  • In wporg-profiles-association-handler, create a handler for the forums. There are two existing handlers that could be used as an example: handle_wordcamp_association() and handle_polyglots_association().
  • When creating a new reply (on bbp_new_reply action), check if the user has more than 400 replies in total, and submit a request to the association handler created on the previous step.
  • Store the result in user meta to avoid further requests to the handler.

I haven't worked with the wporg-profiles-association-handler plugin yet, but feel free to ask any questions, and we'll figure it out together :)

Last edited 3 years ago by SergeyBiryukov (previous) (diff)

This ticket was mentioned in Slack in #forums by macmanx. View the logs.


3 years ago

#7 @obenland
3 years ago

  • Type changed from task to enhancement

@coffee2code Do you have an idea what it would take to get this working?

This ticket was mentioned in Slack in #forums by clorith. View the logs.


3 years ago

This ticket was mentioned in Slack in #meta by sergey. View the logs.


2 years ago

#10 @jobthomas
23 months ago

We were just discussing this very topic in the WP South Africa community and noticing that it's odd that you get a badge after translating some strings, but not after quite a bit of support threads replied to. Would indeed be great to get this sorted.

#11 @tellyworth
21 months ago

  • Milestone set to Q1

#12 @dd32
20 months ago

#2873 was marked as a duplicate.

This ticket was mentioned in Slack in #forums by sergey. View the logs.


2 months ago

#14 @carike
2 months ago

Automation of forum badges have recently been discussed on Slack here:
https://wordpress.slack.com/archives/C02RQC6RW/p1595418743480300
and here:
https://wordpress.slack.com/archives/C02RQC6RW/p1595524007083800

The Forums Team currently awards two badges:

  1. Support Contributor badge;
  2. Support Team badge.

There is consensus that the Support Team badge should be awarded automatically when moderator status is awarded, either on the international forums, or on a Rosetta site.

It seems that the easiest way to do this, would be to hook on to a change in the forum role in bbPress.
This is just a concept, I still need to check the available hooks for bbPress.

add_action ( 'change_forum_role', 'consider_support_team_badge', 10, 2);

Array of eligible roles:

$eligible_support_team_badge = ("moderator", "keymaster");
$ineligible_support_team_badge = ("blocked");

by adding the following checks to the award_support_team_badge callback function:

if ( in_array ($new_role, $eligible_support_team_badge) ) {
   /* 
   *  Does a Support Team badge exist for this user?
   *  No?
   *  Award a Support Team badge. Yay!
   */
}
else if ( in_array ($new_role, $ineligible_support_team_badge) ) {
   /*
   *  Does a Support Team badge exist for this user?
   *  Yes?
   *  Remove Support Team badge.
   * /
}
else { 
   /*
   *  Does a Support Team badge exist for this user?
   *  Yes?
   *  Remove Support Team badge.
   *  Award a past-team member badge (call it something better).
   */
}

Updated per feedback on Slack:
https://wordpress.slack.com/archives/C02RQC6RW/p1595582364198300

A Support Team badge would thus be changed to a past-team badge by changing the user's role.
If the role is not changed, but the person is removed from the site instead, then their badge would remain intact.

A possible alternative would be to use the same method as for Polyglots to check if a person still has editor rights for other locales: [8385]

In terms of Support Contributor badges:

The team favours a semi-automated system.

Therefore I am proposing the following for your input:

  1. Create a new forum (closed to replies, only visible to logged-in users) under each locale, whether international or Rosetta;
  2. Each time a new post is created in bbPress, check if the user has a cumulative total of 400 or more posts for that locale;
  3. If the person has made 400 or more posts and a new topic does not exist for them yet, create a a new topic to the effect of "Congratulations! Username has replied 400 times!" Tag them in the post;
  4. During the weekly Support Team meeting on Slack, new threads can be discussed, whether on the international or Rosetta forums. This should also help to boost Rosetta attendance at these meetings;
  5. If the moderators agree that there is a compelling reason not to award a badge at that stage (such as that a user mainly replied to their own topics), or that their replies are of a low quality, the topic would remain - and they should be placed on mod-watch, or some other onboarding process to help them improve. The topic would remain open and visible to anyone who is logged in to facilitate transparency and accountability;
  6. Automatically upon archiving a topic in that forum, the system should check if the user already has a Support Contributor badge. If they do not, a badge would be automatically awarded.

This proposal would require 400 posts (this should be an aspirational, but achievable number) for a specific locale (any locale).
I believe that calculating a contribution per locale should help to reduce complexity and make it possible to implement the proposal faster.

Ideally, the code would be contained in a small MU-plugin.

Last edited 2 months ago by SergeyBiryukov (previous) (diff)

This ticket was mentioned in Slack in #forums by carike. View the logs.


2 months ago

#16 @carike
2 months ago

  • Description modified (diff)

This ticket was mentioned in Slack in #forums by carike. View the logs.


8 weeks ago

This ticket was mentioned in Slack in #community-team by carike. View the logs.


8 weeks ago

This ticket was mentioned in Slack in #forums by carike. View the logs.


8 weeks ago

#20 @sterndata
8 weeks ago

Create a new forum (closed to replies, only visible to logged-in users) under each locale, whether international or Rosetta; <<

I don't understand. Why? What does it to? I'm not in favor of creating more fora.

If the moderators agree that there is a compelling reason not to award a badge <<

That discussion should probably not be in the #forums channel as it's a public place.

#21 @macmanx
8 weeks ago

This is getting pretty complicated, and I'm not convinced we aren't creating more problems just to solve 1 problem, which again was simply automating the Support badges.

Additionally, the purpose of automation should be to create less manual processes, not more.

The initial proposal was very straight forward:

400 replies = Support Contributor

Moderator = Support Team

Upon reaching the 400 reply goal, the Support Contributor badge would be applied to the profile.

Upon being promoted to Moderator, the Support Team Badge would be applied to the profile.

This ticket was mentioned in Slack in #meta by carike. View the logs.


7 weeks ago

#23 @carike
7 weeks ago

This ticket was discussed during a #meta channel meeting on Slack on 29 July 2020 here:
https://wordpress.slack.com/archives/C02QB8GMM/p1596056793142700 (a Slack account is needed to view the logs).

It is recommended to start out with the initial proposal (automatically awarding a support contributor badge for 400 forum replies and automatically awarding a support team badge for moderator status) and iterate from there.

#24 @carike
7 weeks ago

  • Description modified (diff)

This ticket was mentioned in Slack in #forums by carike. View the logs.


7 weeks ago

#26 follow-up: @sterndata
7 weeks ago

As giving someone moderator status is a considered decision and not something overly frequent, that does not have to be automated.

This ticket was mentioned in Slack in #meta by carike. View the logs.


5 weeks ago

#28 in reply to: ↑ 26 @carike
5 weeks ago

Replying to sterndata:

As giving someone moderator status is a considered decision and not something overly frequent, that does not have to be automated.

Forum moderators for Rosetta forums are not consistently receiving their badges.
The concern here does not relate to the international forums. :coffee:

#29 @macmanx
5 weeks ago

Solid point! If Moderator -> Then Badge makes plenty of sense.

#30 follow-up: @sterndata
4 weeks ago

How many people have more than 400 replies where the last reply is less than two months ago? (There needs to be some cutoff; no point in badging someone who is not currently active in the forums.)

Let's get some idea of the scope of this.

#31 in reply to: ↑ 30 @coffee2code
4 weeks ago

Replying to sterndata:

How many people have more than 400 replies where...

Currently there are 1,862 users with more than 400 replies. I don't agree with the "last reply is less than two months ago" stipulation. Regardless of when they replied, if they meet the criteria for the badge then they meet it. It doesn't save us any effort to try to winnow down the complete list.

Replying to macmanx:

Upon reaching the 400 reply goal, the Support Contributor badge would be applied to the profile.
Upon being promoted to Moderator, the Support Team Badge would be applied to the profile.

I concur with this straightforward criteria. It's easier to understand and easier to implement.

As far as implementation goes, I've already written (though uncommitted) the wporg-profiles-association-handler plugin portion of the changes (which is half of what's needed as Sergey noted earlier).

The support plugin just needs to have functionality added to contact the Profiles association handler when a badge should be awarded. Roughly speaking, that means:

  • Upon publish/approval of a reply, check if it is the user's 400th reply and is so send request to Profiles association handler to assign badge.

For the team badge:

  • Upon change of role to moderator (or higher), send request to Profiles association handler to assign badge.
  • Upon change of role from moderator to something lower, send request to Profiles association handler to remove badge.

Pre-existing users who warrant either or both badges would be assigned the badges just prior to the above coming online.

All in all, not a lot to it. I'll see about coding up the support side of things and testing it out soon.

#32 @macmanx
4 weeks ago

Thanks!

#33 @dd32
3 weeks ago

  • Milestone changed from Q1 to 2020 Q1

Milestone renamed

#34 @dd32
3 weeks ago

  • Milestone changed from 2020 Q1 to Q1

Milestone renamed

#35 @sterndata
3 weeks ago

I'm looking at folks like https://wordpress.org/support/users/nm1com/ and it's convinced me that a grant of an auto-support badge (especially if the grant includes an emailed announcement of that) would encourage such folks. I'd give them props on the #forums if they had a slack account.

So, suggestion: When the badge is granted, send an email with a "Congratulations" message and an invite to the #forums channel on slack.

This ticket was mentioned in Slack in #meta by carike. View the logs.


10 days ago

Note: See TracTickets for help on using tickets.