Skip to:
Content

BuddyPress.org

Opened 6 years ago

Closed 6 years ago

#7820 closed defect (bug) (fixed)

Privacy: Data export for Groups

Reported by: boonebgorges's profile boonebgorges Owned by:
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Groups Keywords: has-patch
Cc:

Description

Parent ticket: #7698

We should include some data about groups in WP user data exports.

What should be included? Much of the content within groups is either handled by Activity (and thus is more logically included in that export) or is handled by plugins (BuddyPress Docs, bbPress, etc). I'd suggest, then, that we really just need a list of group memberships.

We store group memberships in a sorta funky way, so that invitations count as memberships as well. For purposes of the export, I think it's probably OK to lump them together, under a heading 'Group Memberships and Invitations Received'. Each would then have info roughly like this:

  • name
  • url
  • date_modified (label could change based on whether user is a member - "Date Joined" or "Date Invited")
  • inviter name (if there is one)
  • "status", which could be a translation of is_confirmed and is_banned and the other is_ fields into "Banned", "Member", "Mod", "Admin", "Pending", "Creator" (?) (also, do we show 'banned'? this is strictly speaking data that we have about the user)

I guess we may want a different section for "Group Invitations Sent", since the concept is pretty different. Presumably, it'd be:

  • group name
  • group url
  • date sent
  • invitee name
  • status

Does this seem like a fair description of what ought to be included?

See #7817, #7818 for patches that demonstrate an approach.

Attachments (4)

7820.diff (9.4 KB) - added by boonebgorges 6 years ago.
Screenshot_2018-05-22_23-05-59.png (31.4 KB) - added by boonebgorges 6 years ago.
Screenshot_2018-05-22_23-05-44.png (46.3 KB) - added by boonebgorges 6 years ago.
7820.2.diff (13.2 KB) - added by boonebgorges 6 years ago.

Download all attachments as: .zip

Change History (12)

#1 @DJPaul
6 years ago

  • Milestone changed from 3.1 to 4.0

Milestone renamed

#2 @boonebgorges
6 years ago

I've started on the patch for this, and it appears that there are, in fact, four different kinds of data that need to be fetched for a given user

  1. Confirmed memberships
  2. Pending invitations *to* the user
  3. Pending membership requests initiated by the user
  4. Pending invitations *sent by* the user

We have easy techniques for getting a-c - I'll attach a patch. We have no good way of getting d. I've opened a ticket for it: #7859. Once implemented, this type of data will probably need a separate exporter, so that batch counting works properly.

@boonebgorges
6 years ago

#3 @boonebgorges
6 years ago

7820.diff is a work-in-progress, not fully built and depending partly on a patch for #7859. But it demonstrates the different kinds of invitations, and I'm leaving it here in case anyone has thoughts between now and the next chance I get to work on it.

@boonebgorges
6 years ago

#4 @boonebgorges
6 years ago

  • Keywords has-patch added; needs-patch removed

7820.2.diff is an update, after a revision to #7859.

It breaks each of the four different data types into its own exporter. This results in a bit more code (a small amount of it duplicated). But it simplifies the logic, and most importantly, it makes it possible to paginate properly for batch processing.

#5 @DJPaul
6 years ago

Looks good

#6 @boonebgorges
6 years ago

In 12162:

Introduce BP_Groups_Member::get_user_memberships().

This is a new low-level query method that allows a single syntax for fetching
a paginated set of results from the membership table, for different
values of is_pending, etc. Primarily for use in data exporters; see #7820.

Fixes #7859.

#7 @boonebgorges
6 years ago

In 12163:

Add data exporters for Groups component.

See #7820.

#8 @boonebgorges
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.