Page MenuHomePhabricator

When a mentor gets blocked, mark them as away
Closed, ResolvedPublic

Description

Subtask of T317148: Structured mentor list: Blocked mentors [tracking], which has the generic discussion on blocks and mentorship.

In T317148, we decided to mark sitewide blocked users as away automatically. If they get unblocked (or the block expires), their Mentor status should revert back to what it was before (including possible expirations of manually set "Away" status).

Acceptance Criteria

Given a Mentor receives a sitewide block,
Then their Mentor status is automatically set to "Away". The mentor cannot mark as active via Special:MentorDashboard.

Given a Mentor receives a sitewide block and their Mentor status is set to "Away",
Then if/when the block is over, they have the option to set their Mentor status as "Active" (and they will have the same mentees as before the block).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Urbanecm_WMF changed the task status from Open to In Progress.Sep 28 2022, 5:12 PM
Urbanecm_WMF claimed this task.
Urbanecm_WMF triaged this task as Medium priority.

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

[mediawiki/extensions/GrowthExperiments@master] [WIP] MentorStatusManager: Mark blocked mentors as away

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

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

[mediawiki/extensions/GrowthExperiments@master] ManageMentorsEditMentor: Work well with blocked mentors

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

Urbanecm_WMF raised the priority of this task from Medium to High.Oct 25 2022, 10:07 PM

Change 836748 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] MentorStatusManager: Mark blocked mentors as away

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

Change 841931 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ManageMentorsEditMentor: Work well with blocked mentors

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

Urbanecm_WMF changed the task status from In Progress to Open.Oct 26 2022, 3:43 PM
Urbanecm_WMF moved this task from Code Review to QA on the Growth-Team (Sprint 0 (Growth Team)) board.
Etonkovidova subscribed.

@Urbanecm_WMF - all works as expected.

The only failing scenario is when an admin updates the Weight (Number of mentees assigned to me) i.e.

  • an admin goes to Special:ManageMentors and clicks on Edit. An Admin sees that the Away status cannot be changed.

{F35660808}

  • An Admin still can change the Intro message and the Weight.

The changes the Intro message done by an Admin will be reflected on Special:ManageMentors and on a mentor's Special:MentorDashboard
The changes the Weight done by an Admin will be reflected on Special:ManageMentors

  • but not on a mentor's Special:MentorDashboard.**

I waited for the updates for 24 hours. In case it's relevant - I tested Manually assigned mentors.

Checked on testwiki wmf.8 - works as expected.