Activity reporting by user

Hi !

Every user uses the agenda to report their activity (visits, calls, etc…).

Now, I would like to get an activity report by user, this can be a weekly or monthly report…for instance for a salesman…

In Agenda/report, it only gives a report of all the activities by all the users…

Any idea on how to get this ?

Thanks for your help



a code change is required in the comm/action/rapport/index.php

A quick & durty way is to show only the activity of the connected user:
line 79
$sql = “SELECT count(*) as cc,”;
$sql.= " date_format(a.datep, ‘%m/%Y’) as df,";
$sql.= " date_format(a.datep, ‘%m’) as month,";
$sql.= " date_format(a.datep, ‘%Y’) as year";
$sql.= " FROM “.MAIN_DB_PREFIX.“actioncomm as a,”;
$sql.= " “.MAIN_DB_PREFIX.“user as u”;
$sql.= " WHERE a.fk_user_author = ".$user->id.’ ';
$sql.= ’ AND a.entity IN (’.getEntity(‘agenda’).’)’;
//$sql.= " AND percent = 100”;
$sql.= " GROUP BY year, month, df”;
$sql.= " ORDER BY year DESC, month DESC, df DESC";



Anyway don’t hesitate to create a feature request on the github: