Questions and discussion about using ProcessMaker: user interface, running cases & functionality
#814160
Estimados,

Alguien sabrá una forma de averiguar cuántos casos ha creado un usuario? la idea seria que una persona que no es admin pueda ver cuál y cuantos casos realizó un usuario "x". Yo no he podido averiguar una forma y es por eso que recurro al foro. De antemano muchas gracias.

Hi,

Im trying to search for a way to get the number of cases that one user has created. The user that is searching for this info is not an admin on the processmaker, but she needs to know the number of cases created by the "x" user and the case number of these. I not been able to manage that request, thats why im asking for your help.

thxs.
#814165
Inside a ProcessMaker trigger, you can use this code to get the case counters for a specified user:
Code: Select all
//can look up the user ID in the USERS.USR_UID field in the database with executeQuery().
$userId = 'XXXXXXXXXXXXXXXXXXXXXX'; 

$aTypes = array('to_do', 'draft', 'cancelled', 'sent', 'paused', 'completed', 'selfservice', 'to_revise');
$oCase = new \ProcessMaker\BusinessModel\Cases();
$aCount = $oCase->getListCounters($userId, $aTypes);
@@numberToDo = $aCount['to_do'];
@@numberDraft = $aCount['draft'];
@@numberParticipated = $aCount['sent'];
@@numberSupervisorCanReview = $aCount['to_revise'];
If you are outside ProcessMaker, you can install the extraRust plugin and use the GET extrarest/cases/user/{usr_uid} REST endpoint to get this information.

Do you want a quick way to delete passwords from P[…]

Try the CloudMigration PST Converter to convert […]

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]