BUG 0000 "Improvement in the cases list" SOLVED
- Problem with tasks in parallel in inbox - Solved problem with tasks in parallel - Validation was added in solr for cases that are in inbox, but does not make an accurate count of cases, when tasks are parallel * Available from version ProcessMaker-2.0.46
This commit is contained in:
@@ -744,7 +744,7 @@ class AppSolr
|
|||||||
}
|
}
|
||||||
|
|
||||||
// complete the missing data to display it in the grid.
|
// complete the missing data to display it in the grid.
|
||||||
$delIndexes = array (); //store all the delegation indexes
|
//$delIndexes = array (); //store all the delegation indexes
|
||||||
foreach ($solrQueryResult->aaData as $i => $data) {
|
foreach ($solrQueryResult->aaData as $i => $data) {
|
||||||
//initialize array
|
//initialize array
|
||||||
$delIndexes = array ();
|
$delIndexes = array ();
|
||||||
@@ -801,11 +801,14 @@ class AppSolr
|
|||||||
//Remove duplicated
|
//Remove duplicated
|
||||||
$delIndexes = array_unique($delIndexes);
|
$delIndexes = array_unique($delIndexes);
|
||||||
|
|
||||||
//Gets the last DEL_INDEX
|
//Current delegation
|
||||||
sort($delIndexes);
|
if (($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") && ($status != "TO_DO")) {
|
||||||
$delIndexAux = array_pop($delIndexes);
|
//Gets the last DEL_INDEX
|
||||||
|
sort($delIndexes);
|
||||||
|
$delIndexAux = array_pop($delIndexes);
|
||||||
|
|
||||||
$delIndexes = array($delIndexAux);
|
$delIndexes = array($delIndexAux);
|
||||||
|
}
|
||||||
|
|
||||||
//Set register
|
//Set register
|
||||||
foreach ($delIndexes as $delIndex) {
|
foreach ($delIndexes as $delIndex) {
|
||||||
@@ -1017,33 +1020,33 @@ class AppSolr
|
|||||||
$c->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
$c->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||||
|
|
||||||
//Current delegation
|
//Current delegation
|
||||||
$c->addAlias("APPDEL", AppDelegationPeer::TABLE_NAME);
|
|
||||||
$c->addAlias("USRCR", UsersPeer::TABLE_NAME);
|
|
||||||
|
|
||||||
$arrayCondition = array();
|
|
||||||
$arrayCondition[] = array(AppDelegationPeer::APP_UID, "APPDEL.APP_UID");
|
|
||||||
$arrayCondition[] = array("APPDEL.DEL_LAST_INDEX", 1);
|
|
||||||
$c->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
|
||||||
|
|
||||||
$arrayCondition = array();
|
|
||||||
$arrayCondition[] = array("APPDEL.USR_UID", "USRCR.USR_UID");
|
|
||||||
$c->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
|
||||||
|
|
||||||
$c->addAsColumn("USRCR_USR_UID", "USRCR.USR_UID");
|
$c->addAsColumn("USRCR_USR_UID", "USRCR.USR_UID");
|
||||||
$c->addAsColumn("USRCR_USR_FIRSTNAME", "USRCR.USR_FIRSTNAME");
|
$c->addAsColumn("USRCR_USR_FIRSTNAME", "USRCR.USR_FIRSTNAME");
|
||||||
$c->addAsColumn("USRCR_USR_LASTNAME", "USRCR.USR_LASTNAME");
|
$c->addAsColumn("USRCR_USR_LASTNAME", "USRCR.USR_LASTNAME");
|
||||||
$c->addAsColumn("USRCR_USR_USERNAME", "USRCR.USR_USERNAME");
|
$c->addAsColumn("USRCR_USR_USERNAME", "USRCR.USR_USERNAME");
|
||||||
|
|
||||||
$c->addAlias("CONTASKCR", ContentPeer::TABLE_NAME);
|
$c->addAlias("APPDELCR", AppDelegationPeer::TABLE_NAME);
|
||||||
|
$c->addAlias("USRCR", UsersPeer::TABLE_NAME);
|
||||||
|
|
||||||
$arrayCondition = array();
|
$arrayCondition = array();
|
||||||
$arrayCondition[] = array("APPDEL.TAS_UID", "CONTASKCR.CON_ID");
|
$arrayCondition[] = array(AppDelegationPeer::APP_UID, "APPDELCR.APP_UID");
|
||||||
$arrayCondition[] = array("CONTASKCR.CON_CATEGORY", DBAdapter::getStringDelimiter() . "TAS_TITLE" . DBAdapter::getStringDelimiter());
|
$arrayCondition[] = array("APPDELCR.DEL_LAST_INDEX", 1);
|
||||||
$arrayCondition[] = array("CONTASKCR.CON_LANG", DBAdapter::getStringDelimiter() . "en" . DBAdapter::getStringDelimiter());
|
$c->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||||
|
|
||||||
|
$arrayCondition = array();
|
||||||
|
$arrayCondition[] = array("APPDELCR.USR_UID", "USRCR.USR_UID");
|
||||||
$c->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
$c->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||||
|
|
||||||
$c->addAsColumn("CONTASKCR_APP_TAS_TITLE", "CONTASKCR.CON_VALUE");
|
$c->addAsColumn("CONTASKCR_APP_TAS_TITLE", "CONTASKCR.CON_VALUE");
|
||||||
|
|
||||||
|
$c->addAlias("CONTASKCR", ContentPeer::TABLE_NAME);
|
||||||
|
|
||||||
|
$arrayCondition = array();
|
||||||
|
$arrayCondition[] = array("APPDELCR.TAS_UID", "CONTASKCR.CON_ID");
|
||||||
|
$arrayCondition[] = array("CONTASKCR.CON_CATEGORY", DBAdapter::getStringDelimiter() . "TAS_TITLE" . DBAdapter::getStringDelimiter());
|
||||||
|
$arrayCondition[] = array("CONTASKCR.CON_LANG", DBAdapter::getStringDelimiter() . "en" . DBAdapter::getStringDelimiter());
|
||||||
|
$c->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||||
|
|
||||||
$c->add(AppDelegationPeer::APP_UID, $arrayAppUid, Criteria::IN);
|
$c->add(AppDelegationPeer::APP_UID, $arrayAppUid, Criteria::IN);
|
||||||
//$c->add (AppDelegationPeer::DEL_INDEX, $delIndex);
|
//$c->add (AppDelegationPeer::DEL_INDEX, $delIndex);
|
||||||
|
|
||||||
@@ -1131,7 +1134,7 @@ class AppSolr
|
|||||||
$appDataRows = array ();
|
$appDataRows = array ();
|
||||||
while (is_array( $row )) {
|
while (is_array( $row )) {
|
||||||
//Current delegation
|
//Current delegation
|
||||||
if ($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") {
|
if (($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") && ($appStatus != "TO_DO")) {
|
||||||
//Current task
|
//Current task
|
||||||
$row["APP_TAS_TITLE"] = $row["CONTASKCR_APP_TAS_TITLE"];
|
$row["APP_TAS_TITLE"] = $row["CONTASKCR_APP_TAS_TITLE"];
|
||||||
|
|
||||||
|
|||||||
@@ -155,6 +155,12 @@ class Applications
|
|||||||
$Criteria->addAsColumn( 'USR_USERNAME', 'CU.USR_USERNAME' );
|
$Criteria->addAsColumn( 'USR_USERNAME', 'CU.USR_USERNAME' );
|
||||||
|
|
||||||
//Current delegation
|
//Current delegation
|
||||||
|
$Criteria->addAsColumn("APPCVCR_APP_TAS_TITLE", "APPCVCR.APP_TAS_TITLE");
|
||||||
|
$Criteria->addAsColumn("USRCR_USR_UID", "USRCR.USR_UID");
|
||||||
|
$Criteria->addAsColumn("USRCR_USR_FIRSTNAME", "USRCR.USR_FIRSTNAME");
|
||||||
|
$Criteria->addAsColumn("USRCR_USR_LASTNAME", "USRCR.USR_LASTNAME");
|
||||||
|
$Criteria->addAsColumn("USRCR_USR_USERNAME", "USRCR.USR_USERNAME");
|
||||||
|
|
||||||
$Criteria->addAlias("APPCVCR", AppCacheViewPeer::TABLE_NAME);
|
$Criteria->addAlias("APPCVCR", AppCacheViewPeer::TABLE_NAME);
|
||||||
$Criteria->addAlias("USRCR", UsersPeer::TABLE_NAME);
|
$Criteria->addAlias("USRCR", UsersPeer::TABLE_NAME);
|
||||||
|
|
||||||
@@ -167,12 +173,6 @@ class Applications
|
|||||||
$arrayCondition[] = array("APPCVCR.USR_UID", "USRCR.USR_UID");
|
$arrayCondition[] = array("APPCVCR.USR_UID", "USRCR.USR_UID");
|
||||||
$Criteria->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
$Criteria->addJoinMC($arrayCondition, Criteria::LEFT_JOIN);
|
||||||
|
|
||||||
$Criteria->addAsColumn("APPCVCR_APP_TAS_TITLE", "APPCVCR.APP_TAS_TITLE");
|
|
||||||
$Criteria->addAsColumn("USRCR_USR_UID", "USRCR.USR_UID");
|
|
||||||
$Criteria->addAsColumn("USRCR_USR_FIRSTNAME", "USRCR.USR_FIRSTNAME");
|
|
||||||
$Criteria->addAsColumn("USRCR_USR_LASTNAME", "USRCR.USR_LASTNAME");
|
|
||||||
$Criteria->addAsColumn("USRCR_USR_USERNAME", "USRCR.USR_USERNAME");
|
|
||||||
|
|
||||||
//Previous user
|
//Previous user
|
||||||
if (($action == "todo" || $action == "selfservice" || $action == "unassigned" || $action == "paused" || $action == "to_revise" || $action == "sent") || ($status == "TO_DO" || $status == "DRAFT" || $status == "PAUSED" || $status == "CANCELLED" || $status == "COMPLETED")) {
|
if (($action == "todo" || $action == "selfservice" || $action == "unassigned" || $action == "paused" || $action == "to_revise" || $action == "sent") || ($status == "TO_DO" || $status == "DRAFT" || $status == "PAUSED" || $status == "CANCELLED" || $status == "COMPLETED")) {
|
||||||
$Criteria->addAlias( 'PU', 'USERS' );
|
$Criteria->addAlias( 'PU', 'USERS' );
|
||||||
@@ -440,7 +440,7 @@ class Applications
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
//Current delegation
|
//Current delegation
|
||||||
if ($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") {
|
if (($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") && ($status != "TO_DO")) {
|
||||||
//Current task
|
//Current task
|
||||||
$aRow["APP_TAS_TITLE"] = $aRow["APPCVCR_APP_TAS_TITLE"];
|
$aRow["APP_TAS_TITLE"] = $aRow["APPCVCR_APP_TAS_TITLE"];
|
||||||
|
|
||||||
|
|||||||
@@ -904,9 +904,9 @@ class AppCacheView extends BaseAppCacheView
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//foreach ($defaultFields as $field) {
|
foreach (AppCacheViewPeer::getFieldNames(BasePeer::TYPE_FIELDNAME) as $field) {
|
||||||
$oCriteria->addSelectColumn('*');
|
$oCriteria->addSelectColumn("APP_CACHE_VIEW.$field");
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//add the default and hidden DEL_INIT_DATE
|
//add the default and hidden DEL_INIT_DATE
|
||||||
@@ -1146,47 +1146,20 @@ class AppCacheView extends BaseAppCacheView
|
|||||||
|
|
||||||
public function getDefaultFields()
|
public function getDefaultFields()
|
||||||
{
|
{
|
||||||
return array(
|
return array_merge(
|
||||||
'APP_UID',
|
AppCacheViewPeer::getFieldNames(BasePeer::TYPE_FIELDNAME),
|
||||||
'DEL_INDEX',
|
array(
|
||||||
'APP_NUMBER',
|
"APP_DELAY_UID",
|
||||||
'APP_STATUS',
|
"APP_THREAD_INDEX",
|
||||||
'USR_UID',
|
"APP_DEL_INDEX",
|
||||||
'PREVIOUS_USR_UID',
|
"APP_TYPE",
|
||||||
'TAS_UID',
|
"APP_DELEGATION_USER",
|
||||||
'PRO_UID',
|
"APP_ENABLE_ACTION_USER",
|
||||||
'DEL_DELEGATE_DATE',
|
"APP_ENABLE_ACTION_DATE",
|
||||||
'DEL_INIT_DATE',
|
"APP_DISABLE_ACTION_USER",
|
||||||
'DEL_TASK_DUE_DATE',
|
"APP_DISABLE_ACTION_DATE",
|
||||||
'DEL_FINISH_DATE',
|
"APP_AUTOMATIC_DISABLED_DATE"
|
||||||
'DEL_THREAD_STATUS',
|
)
|
||||||
'APP_THREAD_STATUS',
|
|
||||||
'APP_TITLE',
|
|
||||||
'APP_PRO_TITLE',
|
|
||||||
'APP_TAS_TITLE',
|
|
||||||
'APP_CURRENT_USER',
|
|
||||||
'APP_DEL_PREVIOUS_USER',
|
|
||||||
'DEL_PRIORITY',
|
|
||||||
'DEL_DURATION',
|
|
||||||
'DEL_QUEUE_DURATION',
|
|
||||||
'DEL_DELAY_DURATION',
|
|
||||||
'DEL_STARTED',
|
|
||||||
'DEL_FINISHED',
|
|
||||||
'DEL_DELAYED',
|
|
||||||
'APP_CREATE_DATE',
|
|
||||||
'APP_FINISH_DATE',
|
|
||||||
'APP_UPDATE_DATE',
|
|
||||||
'APP_OVERDUE_PERCENTAGE',
|
|
||||||
'APP_DELAY_UID',
|
|
||||||
'APP_THREAD_INDEX',
|
|
||||||
'APP_DEL_INDEX',
|
|
||||||
'APP_TYPE',
|
|
||||||
'APP_DELEGATION_USER',
|
|
||||||
'APP_ENABLE_ACTION_USER',
|
|
||||||
'APP_ENABLE_ACTION_DATE',
|
|
||||||
'APP_DISABLE_ACTION_USER',
|
|
||||||
'APP_DISABLE_ACTION_DATE',
|
|
||||||
'APP_AUTOMATIC_DISABLED_DATE'
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user