Page MenuHomePhabricator

ReassignMentees failed to reassign mentees for {username}; no mentor is available
Closed, ResolvedPublic

Description

On jvwiki, it looks like the only mentor there was removed from the list: https://jv.wikipedia.org/w/index.php?title=M%C3%A9dhiaWiki%3AGrowthMentors.json&diff=1619084&oldid=1601043

Subsequently, we get an error when attempting to reassign the mentees to a new mentor, since there isn't one. How should we handle this type of situation?

Event Timeline

How should we handle this type of situation?

Good question. Probably by dropping the mentor relationship for all mentees (basically emptying growthexperiments_mentee_mentor DB table), and sending a different kind of notification (something along the lines of "The last mentor of this wiki has left, access to mentorship was removed"). Not sure how to phrase that well though (hearing that a wiki has no mentor at all might sound scary).

Emptying the list should turn mentorship off. Should we notify newcomers? Good question. Not having a place where to ask questions will discourage some of them from editing no matter if we tell them that their mentors quit with no alternate choice. Not announcing it seems to be a reasonable option.

It is a more global problem that could be addressed, or at least partially fixed by considering the following actions:

I agree that emptying the list should disable mentorship. My concern with doing that silently would be newcomers who already asked their mentor a question. Wouldn't it be surprising to those users to suddenly not being able to find the mentorship module at all?

I've no strong preference between notifying all mentees or only mentees who asked a question in the past, but I lean towards notifying everyone (because it is simpler and because it avoids confusion for mentees who remember how the dashboard looked before).

kostajh added a subscriber: MShilova_WMF.

Sounds like this is not urgent and we have some implemntation ideas. I've moved to triaged. @Trizek-WMF @MShilova_WMF if there is an epic we should move this to, please feel free to add it.

Urbanecm_WMF triaged this task as Low priority.
Urbanecm_WMF moved this task from New Tasks to Prioritized on the GrowthExperiments-Mentorship board.

In the 2023-05-10 mentorship meeting, we decided to fully disable mentorship for users on wikis when the last mentor resigns/quits/is removed.

Disabled Growth mentorship on jvwiki (diff) per the agreement above.

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

[mediawiki/extensions/GrowthExperiments@master] ReassignMentees: Drop mentor/mentee relationship when no mentor is available

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

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

[mediawiki/extensions/GrowthExperiments@master] Factor mentor-removal out into MentorRemover

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

An additional change we might consider in the future is setting GEMentorshipEnabled to false automatically upon the last mentor resigning. That needs careful consideration though (do we do that from a system account, or the mentor's account is the main quesiton I'd ask around that), and this issue is not happening often, so I just ended up with removing the mentor assignment entriely, and relying on Special:Homepage automatically not displaying the mentorship module upon inability to assign a new mentor.

Change 923336 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ReassignMentees: Drop mentor/mentee relationship when no mentor is available

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

Change 923337 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Factor mentor-removal out into MentorRemover

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