citizenlab
citizenlab copied to clipboard
[TAN-1803] New activities endpoint & filtering for management feed
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_idsorproject_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
:changeattribute 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:changeattribute 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 associatedadmin_publication.publication_statuswas changed. Now that we use the payload of a'changed'activity to provide details of the update, this avoids showing achangedactivity with no details of any updated attribute(s).
Changelog
Technical
- [TAN-1803] New activities endpoint & filtering for management feed
| 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: | |
| :book: | Check translation progress |
Generated by :no_entry_sign: dangerJS against 4ac0f29d2212a4a3b84ed8ec86126942dd520a95
Closed, in favor of simpler approach: #7888