Page MenuHomePhabricator

When a mentor is removed via Speical:ManageMentors, no mentees are reassigned
Closed, ResolvedPublicBUG REPORT

Description

Split from T310292#8334610:

(1) On testwiki wmf.6 removing a mentor (click on Remove on Special:ManageMentors page and then Submit) doesn't re-assign mentees to another mentor.

Steps

  • Zilant18 is a mentor for Zilant1
  • Admin removed Zilant18 from the mentor list
  • Zilant18 doesn't see the Mentor dashboard (only Assign as a mentor) - this action is immediate
  • Zilant1 still sees Zilant18 as an assigned mentor after >3 hours after the action

This is an error in ManageMentorsRemoveMentor::onSubmit method; the call to reassign mentees is missing. Perhaps worth creating an abstraction above StructuredMentorWriter, which would do all the actions that are usually done on mentor removal?

For now, let's just add the missing call to ManageMentorsRemoveMentor::onSubmit.

Event Timeline

Urbanecm_WMF triaged this task as High priority.

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

[mediawiki/extensions/GrowthExperiments@master] ManageMentorsRemoveMentor: Reassign mentees to a different mentor

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

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

[mediawiki/extensions/GrowthExperiments@master] [WIP] Rename QuitMentorship to ReassignMentees

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

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

[mediawiki/extensions/GrowthExperiments@master] ReassignMentees: Pass the actual performer to ChangeMentor

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

Change 850667 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Rename QuitMentorship to ReassignMentees

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

Change 850668 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ReassignMentees: Pass the actual performer to ChangeMentor

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

Change 845473 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ManageMentorsRemoveMentor: Reassign mentees to a different mentor

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

Urbanecm_WMF changed the task status from In Progress to Open.Nov 7 2022, 8:44 AM

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

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.8] Rename QuitMentorship to ReassignMentees

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.8] ReassignMentees: Pass the actual performer to ChangeMentor

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

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

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.8] ManageMentorsRemoveMentor: Reassign mentees to a different mentor

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

Change 853955 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.8] Rename QuitMentorship to ReassignMentees

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

Change 853956 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.8] ReassignMentees: Pass the actual performer to ChangeMentor

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

Change 853957 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@wmf/1.40.0-wmf.8] ManageMentorsRemoveMentor: Reassign mentees to a different mentor

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

Mentioned in SAL (#wikimedia-operations) [2022-11-07T14:21:54Z] <urbanecm@deploy1002> Started scap: Backport for [[gerrit:853537|MentorHooks: Add missing check for GEMentorshipUseIsActiveFlag (T322538)]], [[gerrit:853955|Rename QuitMentorship to ReassignMentees (T321382)]], [[gerrit:853956|ReassignMentees: Pass the actual performer to ChangeMentor (T321382)]], [[gerrit:853957|ManageMentorsRemoveMentor: Reassign mentees to a different mentor (T321382)]]

Mentioned in SAL (#wikimedia-operations) [2022-11-07T14:26:40Z] <urbanecm@deploy1002> urbanecm and urbanecm: Backport for [[gerrit:853537|MentorHooks: Add missing check for GEMentorshipUseIsActiveFlag (T322538)]], [[gerrit:853955|Rename QuitMentorship to ReassignMentees (T321382)]], [[gerrit:853956|ReassignMentees: Pass the actual performer to ChangeMentor (T321382)]], [[gerrit:853957|ManageMentorsRemoveMentor: Reassign mentees to a different mentor (T321382)]] synced to the testse

Mentioned in SAL (#wikimedia-operations) [2022-11-07T14:36:51Z] <urbanecm@deploy1002> Finished scap: Backport for [[gerrit:853537|MentorHooks: Add missing check for GEMentorshipUseIsActiveFlag (T322538)]], [[gerrit:853955|Rename QuitMentorship to ReassignMentees (T321382)]], [[gerrit:853956|ReassignMentees: Pass the actual performer to ChangeMentor (T321382)]], [[gerrit:853957|ManageMentorsRemoveMentor: Reassign mentees to a different mentor (T321382)]] (duration: 14m 56s)

This should now be deployed to production.

@Iniquity, FYI, this means that admins can now cause the reassignment via Special:ManageMentors. Example log entry. I think we talked about this issue on a different task, so that's why I'm pinging you here.