Share ideas, ask questions, and get feedback about developing for ProcessMaker

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
By antonj
#784878
Hi There,

I thought I would do a final check that I am not doing something wrong before logging a bug.

I can't for the life of me get the "report to" functionality to work correctly for managers of sub-departments. It simply routes the task to the originating employee rather than escalating to the manager of the parent department.

The employee table shows USR_REPORTS_TO with the same value as USR_UID for these employees.

I ended up writing a trigger to try and work out who to escalate to as follows:
Code: Select all
require_once 'classes/model/Department.php';
//Retrieve the Employees Department
$d = new Department();
$aInfo = $d->getDepartmentsForUser(@@EmployeeID);
if (is_array($aInfo)) {
//If Employee is not the manager of the department then supervisor = department manager
   if ($aInfo["DEP_MANAGER"] != @@EmployeeID) { 
      $supervisor = $aInfo["DEP_MANAGER"];
//Otherwise, retrieve the parent department for the employees department and supervisor = parent department manager
   } else {
      $d_parent = new Department();
      $aInfo_parent = $d_parent->Load($aInfo["DEP_PARENT"]);
	  $supervisor = $aInfo_parent["DEP_MANAGER"];
   }  
}
@@SupervisorID = $supervisor;
What I have found with this is that $aInfo["DEP_MANAGER"] is empty. In the underlying tables, users.DEP_UID is populated, and department.DEP_MANAGER is populated. :evil:

Can anyone point me in the right direction, or do I log a bug??

Thanks
By AlanBueno
#813901
Can you check in the Admin/Users/Departments tab if the departments you are using have an user assigned as supervisor? The way PM works, when you use the REPORTS TO assignment rule PM searches for the supervisor of the user's department, if it doesnt find any user assigned as supervisor for that department it will then search for a supervisor in a parent department, if your department isnt a sub-department of any other departments, or if its parent department doesnt have an assigned supervisor either then it automatically routes the task to the original user, which is whats happening to you.

You can find more information about this here: http://wiki.processmaker.com/3.0/Managi ... epartments

Maybe try increasing your thread stack size? Seems[…]

I use PM 3.4. Android push works while IOS push do[…]

[quote=ziadeh post_id=823031 time=1550759948 user_[…]

I have to support reports in processmaker 3.4. A s[…]