National-Forestry-Authority / farmers

0 stars 1 forks source link

User activity tracker #133

Open ygoex opened 1 year ago

ygoex commented 1 year ago

Create report views for NFA accounts/payroll department whose purpose is to provide an overview of employee's activity.

ygoex commented 1 year ago

Related issue: https://github.com/National-Forestry-Authority/farmers/issues/86

peacog commented 1 year ago

The core activity tracker does not give us the functionality we need to track user edits, filter results, or export to csv. We need to develop a custom solution.

pcambra commented 1 year ago

@peacog we can track user edits through revisions, I am not sure if we can build views over the tracking.

If we want to build something custom, my recommendation would be to log everything using https://www.drupal.org/project/log (which is included with farmos, so we use the same tooling) and use event subscribers to populate the actions we're interested in. An example of such pattern is the submodule log of commerce https://git.drupalcode.org/project/commerce/-/tree/8.x-2.x/modules/log/src/EventSubscriber

We need to make this feature common so it can be used on brms too.

pcambra commented 1 year ago

Tagging @Yash621 as well here, because he has assigned the BRMS one

LeScruf commented 1 year ago

Hi @pcambra - we were looking at this but don't see an end solution - except to say we fully trust you on the means you are suggesting to achieve it?

peacog commented 1 year ago

Hi @LeScruf The solution we implemented is the two reports you can see https://farmers.nfa.go.ug/admin/reports/nfa/tracker

Do you need more information/options? If so we can look at using the log module that @pcambra suggested

LeScruf commented 1 year ago

Hi @peacog - I think this suffices for now pending a separate issue of incorporating this into an admin dashboard at a later point? Thks!