okfn / ckanext-pdeu

Custom CKAN Extension for PublicData.eu
9 stars 4 forks source link

Implement better group activity streams #27

Closed seanh closed 11 years ago

seanh commented 12 years ago

We are implementing following of groups but it's a bit pointless as the group's activity streams don't contain much of interest (e.g. they don't contain activity from the datasets that belong to the group).

There has been a trac ticket for this for a long time:

http://trac.ckan.org/ticket/1664

Also see John's spec about which activities should appear in which activity streams:

https://docs.google.com/document/d/1VMJ00b3Eao07vbHTVGuYyKAeCWcA0Pm66hJiL-hQCsU/edit

seanh commented 12 years ago

I think an easy way to implement this might be that ckan/logic/action/get.py:group_activity_list() will simply return all activities where either the group or one of the group's datasets is the object of the activity. This would include (hope I didn't miss any):

Changes to the group itself:

Adding datasets to groups:

Changes to the group's datasets:

Changes to the things that belong to the group's datasets:

If that is too many then we can filter by activity_type to remove some of them.

I think the ones to do with related items might have the related item and not the dataset as the object, so those would have to be added specially.

@johnmartin @srkunze Would appreciate your feedback on this. Does that match to what John specified in the google doc? Or should some of those be filtered out?

seanh commented 12 years ago

There's a pull request for this now: https://github.com/okfn/ckan/pull/165

johnmartin commented 12 years ago

@seanh Yes, this all looks good. The only thing I would add is that I've updated the activity stream document to have a bit of clarification on what items to show on the dashboard activity stream. It's as follows:

Generally the rule for showing items on the activity stream of the dashboard is: show all items that are relevant to first tier items (e.g. if you are following a user, show all actions related to user), show top level actions for second tier items (e.g. if you are following a dataset, show actions related to resources added to that group or if you are following a group show items related to datasets) and third level actions should not be shown (e.g. showing resource updates for a dataset of a group that you are following)

seanh commented 12 years ago

Alright. I've made a separate github issue to tweak the contents of the dashboard activity stream. So for this issue we're just waiting for someone from the ckan team to review my pull request.

icmurray commented 11 years ago

Pull request https://github.com/okfn/ckan/pull/165 has been merged into master. Ticket closed.