This module track & logs of entity operations (Create, Update & Delete) action performed by the users/cron are saved in the database and can be viewed on the page /activitytrackinglog.

If you wish to exclude certain entities from being tracking, then you can put the entity name into provide configuration (admin/config/system/activity_tracking) and their logs will not be tracked.

The module allows to track who did the change and when.

Project link

https://www.drupal.org/project/activitytracking

Git instructions

git clone --branch 8.x-1.x https://git.drupalcode.org/project/activitytracking.git

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-activitytracki...

CommentFileSizeAuthor
activity_tarcking.PNG20.53 KBvernit

Comments

vernit created an issue. See original summary.

vernit’s picture

Issue summary: View changes
rajeevgole’s picture

Priority: Major » Normal
Status: Needs review » Needs work

I am seeing few warnings in the PAReview checklist. You may want to resolve those :)

See, https://pareview.sh/pareview/https-git.drupal.org-project-activitytracki...

vernit’s picture

PAReview checklist review and resolved. Please review it.

Project Name & link - Activity Tracking

Git Code Access & Instructions : git clone --branch master git@git.drupal.org:project/activitytracking.git

Branch : 8.x-1.x

vernit’s picture

Priority: Normal » Major
Status: Needs work » Needs review
bekirdag’s picture

Status: Needs review » Needs work

Hello,

There are still issues on https://pareview.sh/pareview/https-git.drupal.org-project-activitytracki...

All of them are about dependency injections. An example on how to fix them,

Instead of using:

$messenger= \Drupal::messenger();
$messenger->addMessage($message, 'statut');

First, use the namespace:

use Drupal\Core\Messenger\MessengerInterface;

Than add protected variable to your class:

protected $messenger;

In your constructor:

  public function __construct(MessengerInterface $messenger) {
    $this->messenger = $messenger;
  }

and then:

  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('messenger')
    );
  }

Then you can use

$this->messenger->addMessage($message, $message_status);

in your code.

I see a number of different injections necessary, you need to apply the same idea for all.

Thank you for your contribution.

avpaderno’s picture

Issue summary: View changes

Thank you for applying! I added the Git instructions for non-maintainer users and the PAReview checklist link. Reviewers will check the project and post comments to list what should be changed.

vernit’s picture

Thanks @bekirdag. Dependency injection has been introduce and update. Please review :

Project link

https://www.drupal.org/project/activitytracking

Git instructions

git clone --branch master git@git.drupal.org:project/activitytracking.git

Branch : 8.x-1.x

PAReview checklist

https://pareview.sh/pareview/https-git.drupal.org-project-activitytracki...

vernit’s picture

Status: Needs work » Needs review
klausi’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for your contribution!

* activity_tracking_page_attachments_alter(): Instead of adding your CSS library here you should add it to the render array in your ActivityTracking form.
* Coding standards:

FILE: /home/klausi/workspace/drupal-8/modules/activitytracking/src/Form/activityTracking.php
--------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------
 17 | ERROR | Class name doesn't match filename; expected "class activityTracking"
--------------------------------------------------------------------------------------------

FILE: /home/klausi/workspace/drupal-8/modules/activitytracking/src/Services/activityTrackingService.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
 14 | ERROR | Class name doesn't match filename; expected "class activityTrackingService"
-------------------------------------------------------------------------------------------------------

* Instead of accessing $_SERVER you should use $this->request->headers->get('User-Agent').
* activity_tracking_schema(): entity type is missing? What if a bundle name is the same between entity types?

Otherwise looks good to me, did not see any security issues.

avpaderno’s picture

Assigned: Unassigned » avpaderno
Priority: Major » Normal
Status: Reviewed & tested by the community » Fixed

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the IRC #drupal-contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

I thank all the dedicated reviewers as well.

vernit’s picture

@klausi : What if a bundle name is the same between entity types? Yes and i will incorporate you suggestion in new release with enhancement.

@kiamlaluno : After status change to fixed still my project shows "This project is not covered by Drupal’s security advisory policy."
When it will change or do i need to do anyelse?

klausi’s picture

You need to edit your project and opt into security advisory coverage.

vernit’s picture

@klausi :"Opt into security advisory coverage" option in disabled mode.

klausi’s picture

Your project is too young (3 days old), I think you can only opt into coverage after some time has passed. Please try again in 2 weeks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.