citizenlab icon indicating copy to clipboard operation
citizenlab copied to clipboard

[TAN-1803] New activities endpoint & filtering for management feed

Open jinjagit opened this issue 1 year ago • 2 comments
trafficstars

WIP

  • Repurposes a redundant index action. Not sure yet if we need a show action.
  • Filters scope first in policy, to just the selected activities that may be shown in the new 'Management Feed'
  • Uses query param filtering by user_ids or project_ids (all 'Management Feed' activities have a relation to user who acted)
  • Introduces a new activity for action: 'changed_publication_status', item_type: ‘Project’
  • Examples of request params in use
  • Examples of responses for each activity type we have selected for the 'Management Feed'

Notes on selected action: 'changed' activities

  • Uses only action: 'changed' activities to cover updates to projects and phases. We could produce specific activities per updated attribute (like we already do for phases, here). However, at this point, minimising the number of kinds of activities we use for the Management Feed is probably best.
  • Uses the existing serialized :change attribute to detail the changes to attributes resulting from an update action, in the payload of the 'changed' activities (also with the key :change). Re-using the existing :change attribute is probably be simpler for the FE to use, compared to introducing a new :changes (plural) attribute, but this could prove to be wrong.
  • Prevents the creation of a 'changed' activity for a project, when no project attribute has been updated. Previously, this could happen when the associated admin_publication.publication_status was changed. Now that we use the payload of a 'changed' activity to provide details of the update, this avoids showing a changed activity with no details of any updated attribute(s).

Changelog

Technical

  • [TAN-1803] New activities endpoint & filtering for management feed

jinjagit avatar May 10 '24 08:05 jinjagit

Warnings
:warning: The PR title contains no Jira issue key (case-sensitive)
:warning: The branch name contains no Jira issue key (case-sensitive)
Messages
:book: Changelog provided 🎉
:book:

Run the e2e tests

:book: Check translation progress

Generated by :no_entry_sign: dangerJS against 4ac0f29d2212a4a3b84ed8ec86126942dd520a95

cl-dev-bot avatar May 10 '24 09:05 cl-dev-bot

Closed, in favor of simpler approach: #7888

jinjagit avatar May 14 '24 13:05 jinjagit