Skip to:
Content

BuddyPress.org

Opened 5 years ago

Closed 5 years ago

#5880 closed enhancement (fixed)

Group details update should be reflected in the activity stream

Reported by: boonebgorges Owned by: boonebgorges
Milestone: 2.2 Priority: normal
Severity: normal Version:
Component: Groups Keywords: needs-refresh
Cc:

Description

See #5879 for a related enhancement (the patches partially overlap).

When a user updates group details (Name and Description), it would be useful for that information to be reflected in the activity stream.

This is a bit more complicated than it seems, so I've made a few decisions in the implementation, which are open for discussion:

  • The fact that we have a "Notify group members" checkbox when making changes suggests that there are two different kinds of details updates: those that are meaningful (eg, a group description is updated to reflect a committee's new mission statement) and those that are not (eg, correcting a typo). I've chosen to respect this checkbox when posting the activity item too.
  • In the spirit of #5879, the activity item will only really be of value if it contains the "from" and "to" name/descriptions. At first, I thought about putting this info into the activity 'content' field. However, putting it here means that it will be untranslatable. It really should go in the activity action, which has an infrastructure for on-the-fly translation (see #3856 r8125). That's what I've done here.
  • I found that including the "from" and "to" text when name *and* description was changed to be cumbersome. It's hard to find a good wording for this ("Boone updated the group Foo, changing the name from 'Bar' to 'Foo' and the description from 'Old Description' to 'New Description'"), and the length gets to be too much in some cases. So, when both items have been changed, I just say: "Boone changed the name and description of the group Foo". When just the name/description are changed, I say "Boone changed the name of the group Foo from "Bar" to "Foo"".
  • In order to compile the action strings dynamically, the "from" and "to" values need to be stored (we don't keep revision history of group data). Moreover, this information needs to be available before the activity item itself is created, so that the activity action can be generated properly the first time around. I've chosen to do it like this: set a piece of groupmeta "updated_details_$timestamp" with the old/new name/description, and then use the activity $timestamp to look this info up at runtime.

Feedback welcome.

At the moment, we do not store revision history of this info, so the old details are lost and un

Attachments (1)

5880.patch (6.3 KB) - added by boonebgorges 5 years ago.

Download all attachments as: .zip

Change History (5)

@boonebgorges
5 years ago

#1 @imath
5 years ago

Very interesting, i'm just a bit afraid of very long group description changes :)

#2 @espellcaste
5 years ago

Great idea! I also think that the mentioned idea of @imath, in the other ticket is also good although I believe it's a bit more work when compared with the current suggestion.

#3 @DJPaul
5 years ago

  • Keywords needs-refresh added; has-patch removed

Patch needs a refresh to apply cleaning. I think the actual code changes look fine, however.

#4 @boonebgorges
5 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 9204:

Create an activity item when a group's details are updated.

When a name or description alone are updated, the activity item will display
the "from" and "to" values as part of the formatted activity action string. If
both items have been changed, the activity action will read "x changed the name
and description of the group y".

Fixes #5880.

Note: See TracTickets for help on using tickets.