Page MenuHomePhabricator

Mentorship: Remove blocked users from Mentorship
Closed, ResolvedPublic2 Estimated Story Points

Description

This became known this while working on T330071: Mentorship: ensure that all mentees are assigned to an active mentor.

When a mentor retires, we reassign all their mentees to a different mentor, including mentees who happen to be currently blocked (whether temporarily or indefinitely). This is likely not necessary, and it sometimes causes confusion.

Recommendation: Silently drop the mentor/mentee relationship (if the block is lifted and user visits Special:Homepage again, they'd get a new mentor automatically).

Acceptance Criteria:

Given a mentee account is blocked,
Then silently drop the mentor/mentee relationship
If the block is lifted and the user visits Special:Homepage again, they'll receive a new mentor automatically.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
KStoller-WMF renamed this task from Mentorship: Determine what to do with blocked users when reassignment to Mentorship: Remove blocked users from Mentorship.Nov 14 2023, 11:23 PM
KStoller-WMF updated the task description. (Show Details)
KStoller-WMF moved this task from Needs Discussion to Backlog on the Growth-Team board.
KStoller-WMF raised the priority of this task from Low to Medium.Mar 25 2024, 3:50 PM
KStoller-WMF moved this task from Backlog to Estimated tasks backlog on the Growth-Team board.
KStoller-WMF subscribed.

Noting that this is coming up again: https://www.mediawiki.org/wiki/Topic:Y1i0b8hxabalbk01

How can I remove a blocked/locked mentee from my mentorship?

I've increased the priority of this task, and I'll see if engineers can give this task an estimate so we can decide when we can fit it in.

I checked the current behavior (cswiki beta).

Regarding the issue reported in Removing a blocked/locked mentee:

  • the Block counter correctly displays the number of blocks
  • the updates on Special:MentorDashboard appear after ~3 hours after the block was set (the expected behavior)

Screen Shot 2024-03-26 at 10.04.08 PM.png (1×1 px, 212 KB)

Other notes:

  • Special:MentorDashboard doesn't sufficiently inform mentors about delays in displaying updates; it might be confusing for mentors to see the changes immediately in Recent changes by your mentees but not in Your mentees table.
  • limited time blocks don't remove mentees from Special:MentorDashboard
  • an email for praising mentees comes before the information appears in Send praise module
  • are we sure that any type of blocks (even partial, time-limited blocks) should remove mentees from mentor-mentees relationship?

Note this should also apply to mentors/mentees who are globally blocked or globally locked. This will also remove vanished users from mentorship.

This task is about blocked mentees. Blocked mentors were handled by T317148

KStoller-WMF set the point value for this task to 2.Feb 4 2025, 5:18 PM

Change #1118807 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Mentorship: Remove indefinitely blocked mentees from mentorship

https://gerrit.wikimedia.org/r/1118807

Change #1119100 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] refactor: Streamline MentorPageMentorManager

https://gerrit.wikimedia.org/r/1119100

Change #1119172 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] Refactor: Rename MentorPageMentorManager to a more descriptive name

https://gerrit.wikimedia.org/r/1119172

Change #1119175 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] refactor: Drop MentorManager::getMentorForUser

https://gerrit.wikimedia.org/r/1119175

Change #1119189 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] refactor: Drop MentorManager::getEffectiveMentorForUserSafe

https://gerrit.wikimedia.org/r/1119189

Change #1119203 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/core@master] block: Introduce AbstractBlock::isIndefinite

https://gerrit.wikimedia.org/r/1119203

Change #1119203 merged by jenkins-bot:

[mediawiki/core@master] block: Introduce AbstractBlock::isIndefinite

https://gerrit.wikimedia.org/r/1119203

Change #1119100 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refactor: Streamline MentorPageMentorManager

https://gerrit.wikimedia.org/r/1119100

Change #1119172 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refactor: Rename MentorPageMentorManager to a more descriptive name

https://gerrit.wikimedia.org/r/1119172

Change #1119175 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refactor: Drop MentorManager::getMentorForUser

https://gerrit.wikimedia.org/r/1119175

Change #1119189 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] refactor: Drop MentorManager::getEffectiveMentorForUser

https://gerrit.wikimedia.org/r/1119189

Change #1118807 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Mentorship: Remove indefinitely blocked mentees from mentorship

https://gerrit.wikimedia.org/r/1118807

QA note: As part of this task, we did quite a lot of mentorship-related refactoring. It is possible random regressions related to mentor list and mentor assignment would happen here and there.

Tested on enwiki beta - the test results are in the table

User type blockMentorship dropped?When unblocked
Case 1 user 1 - Sitewide, IndefiniteYes - a blocked user doesn't see Mentorship module; a mentor doesn't see the blocked useran un-blocked user sees a new mentor
Case 2 user 2 - Sitewide, with expiration dateNo - a user still sees Mentorship module; a mentor sees the blocked user. Attempting to send a message from Special:Homepage results in the error message:
Screen Shot 2025-02-18 at 3.37.51 PM.png (1×1 px, 211 KB)
an un-blocked user gets a mentor
Case 3 user 3 - Partial, indefiniteYes - a blocked user doesn't see Mentorship module; a mentor doesn't see the blocked useran un-blocked user sees a new mentor
Case 4 user 4 - Partial, with expiration dateNo - a user still sees Mentorship module; a mentor sees the blocked user. Sending a message to a mentor from Special:Homepage is successful.an un-blocked user gets a mentor

My blocked mentee was removed from my Mentorship Dashboard at the enwiki. Are any of the four results posted above implemented at the enwiki now?

My blocked mentee was removed from my Mentorship Dashboard at the enwiki. Are any of the four results posted above implemented at the enwiki now?

The patches in this task will be deployed to wmf.17, so those changes are scheduled to be on enwiki` on Feb 20 The existing behavior - blocked mentees are removed from MentorDashboard - was in place before, but this task makes dropping mentor/mentee relationship consistent (for different types of user blocks) and makes such changes appear promptly.