Page MenuHomePhabricator

Story: WikimetricsUser deletes user from cohort [21 pts]
Closed, ResolvedPublic21 Estimated Story Points

Description

A user can legally request to be removed from a cohort. The creator of that cohort needs a simple mechanism to remove that user from the cohort.

All occurrences of that user (including in other projects) must be removed.


Version: unspecified
Severity: enhancement
Whiteboard: u=WikimetricsUser c=Wikimetrics p=21

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:53 AM
bzimport set Reference to bz73350.
bzimport added a subscriber: Unknown Object (MLST).
kevinator renamed this task from Story: WikimetricsUser deletes user from cohort to Story: WikimetricsUser deletes user from cohort [21]pts.Nov 26 2014, 1:05 AM
kevinator renamed this task from Story: WikimetricsUser deletes user from cohort [21]pts to Story: WikimetricsUser deletes user from cohort [21pts].
kevinator moved this task from Incoming to Radar on the Analytics-Engineering board.
Milimetric renamed this task from Story: WikimetricsUser deletes user from cohort [21pts] to Story: WikimetricsUser deletes user from cohort [21 pts].Dec 2 2014, 4:10 PM
kevinator lowered the priority of this task from High to Medium.Dec 2 2014, 4:27 PM

Jonathan:
@mforns pointed out an issue that can arise in the delete-user scenario. Grouping all users with the same name onto one line is problematic in some edge case:

1- create a cohort with foobar (a user who has only every used enwiki)
2- add a line to the cohort with "foobar, frwiki"
3- upload a cohort

foobar on frwiki is an invalid user. Therefore it's weird to group him. The easiest thing to do is show each user/wiki duplet on separate lines.

I don't think this is a big issue. Can you confirm. BTW here is a screenshot from Marcel. I don't think it's an issue to have to manually remove a user from all the wikis he's in, since it is not going to happen very often.

Screenshot_from_2014-12-05_15_40_26.png (768×1 px, 94 KB)

Not sure I quite understand how it's weird to group them. Is it weird from the user's perspective, or only ours?

I personally hate it when web interfaces force you to perform the same action many times, rather than offer a batch action option. If I have to click "remove" more than five times to delete one user, that's a pretty bad experience. So this is a pet peeve of mine. Deleting line-by-line gets unscalable really quickly: I realize the story is titled "Delete a user from a cohort", but did we really want to design a feature to support ONLY the use case "delete ONE user from a cohort"?

@Capt_Swing, we brainstormed a couple of solutions. The first one is our favorite. In either case, it's not mandatory to remove invalid entries, but I suspect users may want to do housekeeping when they see an entry is invalid.

  1. Use one line per user. Write on that line that line "Valid in X projects, invalid in Y projects". Add 2 buttons at the end of the line "Remove Invalid" and "Remove".
  2. Use 2 lines for users in this case. The first line has all the valid projects a user is in. The second line has all the invalid projects a user is in.

In both cases we could add a link to display the projects a user is in... but that's another feature and we can log if we want it.

@kevinator I think option 1 sounds really good. Do we only display the "Remove invalid" button if there are invalid users? Or, possibly we can grey it out and make it unclickable? Either way, sounds like a good solution to me. Thanks! - Jonathan

For option 1, we would not display the button at all. No need to grey it out.
@mforns, you can proceed!

Change 178746 had a related patch set uploaded (by Mforns):
Add cohort membership page

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

Patch-For-Review

kevinator raised the priority of this task from Medium to High.Dec 11 2014, 5:55 PM

Change 178746 merged by Nuria:
Add cohort membership page

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

Moving this back to WIP column as I have found a bug. The bug will be logged as a child task.

re-opening because of discovered bug: T78584

Nuria reopened this task as Open.

From: Jonathan
Date: Wed, Dec 17, 2014 at 12:16 PM
Subject: Re: Delete User is on staging
To: Kevin

Bug is still there for me. Screenshots attached. The cohort is a raw CSV from here: http://quarry.wmflabs.org/query/955. I deleted the old version of this cohort from the last test and uploaded this one for the current round of testing.

hobbit_editors1: after upload and verification, I am told that 4 users are invalid.
hobbit_editors2: I clicked "view members" and now I see that there are 66 invalid entries.

After taking this screenshot, I hovered over "projects" on user 2nyte, to verify that enwiki was one of their listed projects. Then I clicked "remove invalid" and hovered again. Enwiki was no longer listed. So it looks like the bug persists: enwiki is showing up as invalid for some (but not all) members, even though this cohort comes from enwiki.

LMK if you want me to test again, or if you want to jump into a stand up about this.

Cheers,
J

We found a bug that causes this behavior.

It is an old bug, that was made evident by an improvement on centralauth expansion included in this task.
Namely, when there are two users with the same name and two different versions for the same project, i.e.:

JSmith,en
JSmith,enwiki

this causes validation inconsistencies, and all the symptoms described above.
I'm working on that.

Change 181001 had a related patch set uploaded (by Mforns):
Normalize project before deduplicating

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

Patch-For-Review

Change 181001 merged by jenkins-bot:
Normalize project before deduplicating

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