BUG 9721 Reassign cases not working properly on Parallel tasks SOLVED
- The TAS_UID was not sent and used when get the users list - TAS_UID is send and some other validations was added
This commit is contained in:
@@ -105,7 +105,7 @@ class Applications
|
|||||||
$Criteria->addAsColumn('USR_USERNAME', 'CU.USR_USERNAME');
|
$Criteria->addAsColumn('USR_USERNAME', 'CU.USR_USERNAME');
|
||||||
|
|
||||||
// Fix for previous user
|
// Fix for previous user
|
||||||
if ($action == 'todo' || $action == 'selfservice' || $action =='unassigned' || $action == 'paused' || $action == 'to_revise') {
|
if ($action == 'todo' || $action == 'selfservice' || $action =='unassigned' || $action == 'paused' || $action == 'to_revise' || $action == 'sent') {
|
||||||
$Criteria->addAlias('PU', 'USERS');
|
$Criteria->addAlias('PU', 'USERS');
|
||||||
$Criteria->addJoin(AppCacheViewPeer::PREVIOUS_USR_UID, 'PU.USR_UID', Criteria::LEFT_JOIN);
|
$Criteria->addJoin(AppCacheViewPeer::PREVIOUS_USR_UID, 'PU.USR_UID', Criteria::LEFT_JOIN);
|
||||||
$Criteria->addAsColumn('PREVIOUS_USR_FIRSTNAME', 'PU.USR_FIRSTNAME');
|
$Criteria->addAsColumn('PREVIOUS_USR_FIRSTNAME', 'PU.USR_FIRSTNAME');
|
||||||
@@ -305,7 +305,7 @@ class Applications
|
|||||||
$Criteria->setOffset( $start );
|
$Criteria->setOffset( $start );
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
// this is the optimal way or query to render the cases search list
|
// this is the optimal way or query to render the cases search list
|
||||||
// fixing the bug related to the wrong data displayed in the list
|
// fixing the bug related to the wrong data displayed in the list
|
||||||
if ( $action == 'search' ) {
|
if ( $action == 'search' ) {
|
||||||
@@ -323,7 +323,6 @@ class Applications
|
|||||||
$params = array ( $maxDelIndexList );
|
$params = array ( $maxDelIndexList );
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
//execute the query
|
//execute the query
|
||||||
$oDataset = AppCacheViewPeer::doSelectRS($Criteria);
|
$oDataset = AppCacheViewPeer::doSelectRS($Criteria);
|
||||||
@@ -344,7 +343,7 @@ class Applications
|
|||||||
* but Propel might not support it and subqueries can be slower for larger
|
* but Propel might not support it and subqueries can be slower for larger
|
||||||
* datasets).
|
* datasets).
|
||||||
*/
|
*/
|
||||||
if ($action == 'sent' || $action == 'search') {
|
/*if ($action == 'sent' || $action == 'search') {
|
||||||
$maxCriteria = new Criteria('workflow');
|
$maxCriteria = new Criteria('workflow');
|
||||||
$maxCriteria->add(AppCacheViewPeer::APP_UID, $aRow['APP_UID'], Criteria::EQUAL);
|
$maxCriteria->add(AppCacheViewPeer::APP_UID, $aRow['APP_UID'], Criteria::EQUAL);
|
||||||
$maxCriteria->addDescendingOrderByColumn(AppCacheViewPeer::DEL_INDEX);
|
$maxCriteria->addDescendingOrderByColumn(AppCacheViewPeer::DEL_INDEX);
|
||||||
@@ -361,7 +360,7 @@ class Applications
|
|||||||
}
|
}
|
||||||
|
|
||||||
$maxDataset->close();
|
$maxDataset->close();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if (!isset($aRow['APP_CURRENT_USER']))
|
if (!isset($aRow['APP_CURRENT_USER']))
|
||||||
$aRow['APP_CURRENT_USER'] = "[Unassigned]";
|
$aRow['APP_CURRENT_USER'] = "[Unassigned]";
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class AppCacheView extends BaseAppCacheView
|
|||||||
break;
|
break;
|
||||||
case 'sent':
|
case 'sent':
|
||||||
$criteria = $this->getSentCountCriteria($userUid);
|
$criteria = $this->getSentCountCriteria($userUid);
|
||||||
return AppCacheViewPeer::doCount($criteria, true);
|
//return AppCacheViewPeer::doCount($criteria, true);
|
||||||
break;
|
break;
|
||||||
case 'selfservice':
|
case 'selfservice':
|
||||||
$criteria = $this->getUnassignedCountCriteria($userUid);
|
$criteria = $this->getUnassignedCountCriteria($userUid);
|
||||||
@@ -207,12 +207,13 @@ class AppCacheView extends BaseAppCacheView
|
|||||||
*/
|
*/
|
||||||
public function getSentCountCriteria($userUid)
|
public function getSentCountCriteria($userUid)
|
||||||
{
|
{
|
||||||
$criteria = new Criteria('workflow');
|
/*$criteria = new Criteria('workflow');
|
||||||
$criteria = $this->addPMFieldsToCriteria('sent');
|
$criteria = $this->addPMFieldsToCriteria('sent');
|
||||||
|
|
||||||
$criteria->add(AppCacheViewPeer::USR_UID, $userUid);
|
$criteria->add(AppCacheViewPeer::USR_UID, $userUid);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;*/
|
||||||
|
return $this->getSentListCriteria($userUid);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -226,9 +227,11 @@ class AppCacheView extends BaseAppCacheView
|
|||||||
|
|
||||||
//$criteria->addAsColumn('MAX_DEL_INDEX', 'MAX(' . AppDelegationPeer::DEL_INDEX . ')');
|
//$criteria->addAsColumn('MAX_DEL_INDEX', 'MAX(' . AppDelegationPeer::DEL_INDEX . ')');
|
||||||
//$criteria->addJoin(AppCacheViewPeer::APP_UID , AppDelegationPeer::APP_UID, Criteria::LEFT_JOIN);
|
//$criteria->addJoin(AppCacheViewPeer::APP_UID , AppDelegationPeer::APP_UID, Criteria::LEFT_JOIN);
|
||||||
$criteria->add(AppCacheViewPeer::USR_UID, $userUid);
|
//$criteria->add(AppCacheViewPeer::USR_UID, $userUid);
|
||||||
$criteria->addGroupByColumn(AppCacheViewPeer::APP_UID);
|
//$criteria->addGroupByColumn(AppCacheViewPeer::APP_UID);
|
||||||
//$criteria->addGroupByColumn(AppCacheViewPeer::APP_);
|
//$criteria->addGroupByColumn(AppCacheViewPeer::APP_);
|
||||||
|
$criteria->add(AppCacheViewPeer::PREVIOUS_USR_UID, $userUid);
|
||||||
|
$criteria->add(AppCacheViewPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -571,10 +574,11 @@ class AppCacheView extends BaseAppCacheView
|
|||||||
public function getSearchCountCriteria()
|
public function getSearchCountCriteria()
|
||||||
{
|
{
|
||||||
//$criteria = new Criteria('workflow');
|
//$criteria = new Criteria('workflow');
|
||||||
$criteria = $this->addPMFieldsToCriteria('sent');
|
//$criteria = $this->addPMFieldsToCriteria('sent');
|
||||||
|
|
||||||
return $criteria;
|
//return $criteria;
|
||||||
//return $this->getSearchCriteria(true);
|
//return $this->getSearchCriteria(true);
|
||||||
|
return $this->getSearchListCriteria();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSearchAllCount()
|
public function getSearchAllCount()
|
||||||
|
|||||||
@@ -215,6 +215,8 @@ class Ajax
|
|||||||
global $G_TABLE;
|
global $G_TABLE;
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
|
G::LoadClass('processMap');
|
||||||
|
|
||||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
|
$oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
|
||||||
$oTemplatePower->prepare();
|
$oTemplatePower->prepare();
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
@@ -224,6 +226,7 @@ class Ajax
|
|||||||
|
|
||||||
//$oHeadPublisher->addScriptfile('/jscore/processmap/core/processmap.js');
|
//$oHeadPublisher->addScriptfile('/jscore/processmap/core/processmap.js');
|
||||||
$oHeadPublisher->addScriptCode('
|
$oHeadPublisher->addScriptCode('
|
||||||
|
var maximunX = ' . processMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
|
||||||
window.onload = function(){
|
window.onload = function(){
|
||||||
var pb=leimnud.dom.capture("tag.body 0");
|
var pb=leimnud.dom.capture("tag.body 0");
|
||||||
Pm=new processmap();
|
Pm=new processmap();
|
||||||
|
|||||||
@@ -430,6 +430,9 @@
|
|||||||
$caseReaderFields[] = array( 'name' => 'APP_UID' );
|
$caseReaderFields[] = array( 'name' => 'APP_UID' );
|
||||||
$caseReaderFields[] = array( 'name' => 'USR_UID' );
|
$caseReaderFields[] = array( 'name' => 'USR_UID' );
|
||||||
$caseReaderFields[] = array( 'name' => 'PREVIOUS_USR_UID' );
|
$caseReaderFields[] = array( 'name' => 'PREVIOUS_USR_UID' );
|
||||||
|
$caseReaderFields[] = array( 'name' => 'PREVIOUS_USR_FIRSTNAME' );
|
||||||
|
$caseReaderFields[] = array( 'name' => 'PREVIOUS_USR_LASTNAME' );
|
||||||
|
$caseReaderFields[] = array( 'name' => 'PREVIOUS_USR_USERNAME' );
|
||||||
$caseReaderFields[] = array( 'name' => 'APP_NUMBER' );
|
$caseReaderFields[] = array( 'name' => 'APP_NUMBER' );
|
||||||
$caseReaderFields[] = array( 'name' => 'APP_STATUS' );
|
$caseReaderFields[] = array( 'name' => 'APP_STATUS' );
|
||||||
$caseReaderFields[] = array( 'name' => 'DEL_INDEX' );
|
$caseReaderFields[] = array( 'name' => 'DEL_INDEX' );
|
||||||
|
|||||||
@@ -78,12 +78,14 @@ switch (($_POST['action'])?$_POST['action']:$_REQUEST['action']) {
|
|||||||
G::RenderPage('publish', 'raw');
|
G::RenderPage('publish', 'raw');
|
||||||
break;
|
break;
|
||||||
case 'showProcessMap':
|
case 'showProcessMap':
|
||||||
|
G::LoadClass('processMap');
|
||||||
$oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
|
$oTemplatePower = new TemplatePower(PATH_TPL . 'processes/processes_Map.html');
|
||||||
$oTemplatePower->prepare();
|
$oTemplatePower->prepare();
|
||||||
$G_PUBLISH = new Publisher();
|
$G_PUBLISH = new Publisher();
|
||||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode('
|
$oHeadPublisher->addScriptCode('
|
||||||
|
var maximunX = ' . processMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
|
||||||
var pb=leimnud.dom.capture("tag.body 0");
|
var pb=leimnud.dom.capture("tag.body 0");
|
||||||
Pm=new processmap();
|
Pm=new processmap();
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
|
|||||||
foreach ($sortable_array as $k => $v) {
|
foreach ($sortable_array as $k => $v) {
|
||||||
if ($query==''){
|
if ($query==''){
|
||||||
$new_array[] = $array[$k];
|
$new_array[] = $array[$k];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( preg_match("/".$query."/i", $array[$k]['userFullname']) ) {
|
if ( preg_match("/".$query."/i", $array[$k]['userFullname']) ) {
|
||||||
$new_array[] = $array[$k];
|
$new_array[] = $array[$k];
|
||||||
@@ -57,11 +57,11 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
|
|||||||
return $new_array;
|
return $new_array;
|
||||||
}
|
}
|
||||||
// $APP_UIDS = explode(',', $_POST['APP_UID']);
|
// $APP_UIDS = explode(',', $_POST['APP_UID']);
|
||||||
|
|
||||||
$appUid = isset($_POST['application']) ? $_POST['application'] : '';
|
$appUid = isset($_POST['application']) ? $_POST['application'] : '';
|
||||||
// $processUid = isset($_POST['process']) ? $_POST['process'] : '';
|
// $processUid = isset($_POST['process']) ? $_POST['process'] : '';
|
||||||
// $TaskUid = isset($_POST['task']) ? $_POST['task'] : '';
|
$TaskUid = isset($_POST['task']) ? $_POST['task'] : '';
|
||||||
$sReassignFromUser = isset($_POST['user']) ? $_POST['user'] : '';
|
$sReassignFromUser = isset($_POST['currentUser']) ? $_POST['currentUser'] : '';
|
||||||
|
|
||||||
G::LoadClass('tasks');
|
G::LoadClass('tasks');
|
||||||
G::LoadClass('groups');
|
G::LoadClass('groups');
|
||||||
@@ -76,25 +76,25 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
|
|||||||
$aCasesList = Array();
|
$aCasesList = Array();
|
||||||
|
|
||||||
// foreach ( $APP_UIDS as $APP_UID ) {
|
// foreach ( $APP_UIDS as $APP_UID ) {
|
||||||
$aCase = $oCases->loadCaseInCurrentDelegation($appUid);
|
//$aCase = $oCases->loadCaseInCurrentDelegation($appUid);
|
||||||
|
|
||||||
$aUsersInvolved = Array();
|
$aUsersInvolved = Array();
|
||||||
$aCaseGroups = $oTasks->getGroupsOfTask($aCase['TAS_UID'], 1);
|
$aCaseGroups = $oTasks->getGroupsOfTask($TaskUid, 1);
|
||||||
$oConf = new Configurations;
|
$oConf = new Configurations;
|
||||||
$ConfEnv= $oConf->getFormats();
|
$ConfEnv= $oConf->getFormats();
|
||||||
foreach ( $aCaseGroups as $aCaseGroup ) {
|
foreach ( $aCaseGroups as $aCaseGroup ) {
|
||||||
$aCaseUsers = $oGroups->getUsersOfGroup($aCaseGroup['GRP_UID']);
|
$aCaseUsers = $oGroups->getUsersOfGroup($aCaseGroup['GRP_UID']);
|
||||||
foreach ( $aCaseUsers as $aCaseUser ) {
|
foreach ( $aCaseUsers as $aCaseUser ) {
|
||||||
if ( $aCaseUser['USR_UID'] != $sReassignFromUser ) {
|
if ( $aCaseUser['USR_UID'] != $sReassignFromUser ) {
|
||||||
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
|
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
|
||||||
$sCaseUser = G::getFormatUserList ($ConfEnv['format'],$aCaseUserRecord);
|
$sCaseUser = G::getFormatUserList ($ConfEnv['format'],$aCaseUserRecord);
|
||||||
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
// $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
||||||
$aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $sCaseUser); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
$aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $sCaseUser); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$aCaseUsers = $oTasks->getUsersOfTask($aCase['TAS_UID'], 1);
|
$aCaseUsers = $oTasks->getUsersOfTask($TaskUid, 1);
|
||||||
foreach ( $aCaseUsers as $aCaseUser ) {
|
foreach ( $aCaseUsers as $aCaseUser ) {
|
||||||
if ( $aCaseUser['USR_UID'] != $sReassignFromUser ) {
|
if ( $aCaseUser['USR_UID'] != $sReassignFromUser ) {
|
||||||
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
|
$aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
|
||||||
@@ -105,7 +105,7 @@ function array_sort($array, $on, $order=SORT_ASC, $query='')
|
|||||||
}
|
}
|
||||||
// $oTmp = new stdClass();
|
// $oTmp = new stdClass();
|
||||||
// $oTmp->items = $aUsersInvolved;
|
// $oTmp->items = $aUsersInvolved;
|
||||||
$result = array();
|
$result = array();
|
||||||
$aUsersInvolved = array_sort($aUsersInvolved,'userFullname',SORT_ASC, $query);
|
$aUsersInvolved = array_sort($aUsersInvolved,'userFullname',SORT_ASC, $query);
|
||||||
$result['data'] = $aUsersInvolved;
|
$result['data'] = $aUsersInvolved;
|
||||||
print G::json_encode( $result ) ;
|
print G::json_encode( $result ) ;
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
|||||||
break;
|
break;
|
||||||
case 'PROCESSMAP':
|
case 'PROCESSMAP':
|
||||||
G::LoadClass('case');
|
G::LoadClass('case');
|
||||||
|
G::LoadClass('processMap');
|
||||||
$oCase = new Cases();
|
$oCase = new Cases();
|
||||||
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
|
$aFields = $oCase->loadCase($_SESSION['APPLICATION']);
|
||||||
if (isset($aFields['TITLE'])) {
|
if (isset($aFields['TITLE'])) {
|
||||||
@@ -72,6 +73,7 @@ switch (($aCaseTracker['CT_MAP_TYPE'])) {
|
|||||||
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
|
||||||
$oHeadPublisher = & headPublisher::getSingleton();
|
$oHeadPublisher = & headPublisher::getSingleton();
|
||||||
$oHeadPublisher->addScriptCode('
|
$oHeadPublisher->addScriptCode('
|
||||||
|
var maximunX = ' . processMap::getMaximunTaskX($_SESSION['PROCESS']) . ';
|
||||||
leimnud.event.add(window,"load",function(){
|
leimnud.event.add(window,"load",function(){
|
||||||
var pb = leimnud.dom.capture("tag.body 0");
|
var pb = leimnud.dom.capture("tag.body 0");
|
||||||
pm = new processmap();
|
pm = new processmap();
|
||||||
|
|||||||
@@ -852,7 +852,7 @@ Ext.onReady ( function() {
|
|||||||
'select': function() {
|
'select': function() {
|
||||||
filterProcess = comboAllUsers.value;
|
filterProcess = comboAllUsers.value;
|
||||||
|
|
||||||
if (filterProcess==''){
|
/*if (filterProcess==''){
|
||||||
btnSelectAll.hide();
|
btnSelectAll.hide();
|
||||||
btnUnSelectAll.hide();
|
btnUnSelectAll.hide();
|
||||||
btnReassign.hide();
|
btnReassign.hide();
|
||||||
@@ -861,7 +861,7 @@ Ext.onReady ( function() {
|
|||||||
btnSelectAll.show();
|
btnSelectAll.show();
|
||||||
btnUnSelectAll.show();
|
btnUnSelectAll.show();
|
||||||
btnReassign.show();
|
btnReassign.show();
|
||||||
}
|
}*/
|
||||||
storeCases.setBaseParam( 'user', filterProcess);
|
storeCases.setBaseParam( 'user', filterProcess);
|
||||||
storeCases.load({params:{user: filterProcess, start : 0 , limit : pageSize}});
|
storeCases.load({params:{user: filterProcess, start : 0 , limit : pageSize}});
|
||||||
}},
|
}},
|
||||||
@@ -1741,6 +1741,8 @@ var gridForm = new Ext.FormPanel({
|
|||||||
click: function() {
|
click: function() {
|
||||||
rows = this.getSelectionModel().getSelections();
|
rows = this.getSelectionModel().getSelections();
|
||||||
var application = '';
|
var application = '';
|
||||||
|
var task = '';
|
||||||
|
var currentUser = '';
|
||||||
comboUsersToReassign.disable();
|
comboUsersToReassign.disable();
|
||||||
if( rows.length > 0 ) {
|
if( rows.length > 0 ) {
|
||||||
comboUsersToReassign.enable();
|
comboUsersToReassign.enable();
|
||||||
@@ -1748,13 +1750,17 @@ var gridForm = new Ext.FormPanel({
|
|||||||
for(i=0; i<rows.length; i++) {
|
for(i=0; i<rows.length; i++) {
|
||||||
// filtering duplicate tasks
|
// filtering duplicate tasks
|
||||||
application = rows[i].get('APP_UID');
|
application = rows[i].get('APP_UID');
|
||||||
|
task = rows[i].get('TAS_UID');
|
||||||
|
currentUser = rows[i].get('USR_UID');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
comboUsersToReassign.clearValue();
|
comboUsersToReassign.clearValue();
|
||||||
storeUsersToReassign.removeAll();
|
storeUsersToReassign.removeAll();
|
||||||
storeUsersToReassign.setBaseParam('application',application);
|
storeUsersToReassign.setBaseParam('application', application);
|
||||||
|
storeUsersToReassign.setBaseParam('task', task);
|
||||||
|
storeUsersToReassign.setBaseParam('currentUser', currentUser);
|
||||||
|
|
||||||
storeUsersToReassign.load();
|
storeUsersToReassign.load();
|
||||||
//alert(record.USERS);
|
//alert(record.USERS);
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ Ext.onReady(function(){
|
|||||||
x : 100,
|
x : 100,
|
||||||
y : 100,
|
y : 100,
|
||||||
constrain : true,
|
constrain : true,
|
||||||
items : [treeToRevise]
|
items : [treeToRevise],
|
||||||
|
closeAction : 'hide'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user